From 4d7d52d6818da0147605f0d9c688facded5dfc02 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 10 Aug 2015 18:06:37 +0100 Subject: [PATCH 1/6] Bump version --- _oasis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_oasis b/_oasis index 766c74bab..1e88aaa4a 100644 --- a/_oasis +++ b/_oasis @@ -1,6 +1,6 @@ OASISFormat: 0.4 Name: git -Version: 1.7.0 +Version: 1.7.1 Synopsis: A low-level interface to Git in pure OCaml Authors: Thomas Gazagnaire License: ISC From 30f462d967e1f7aa7dc94c52532dc381aa299abe Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 10 Aug 2015 18:06:52 +0100 Subject: [PATCH 2/6] Update autogen files --- lib/META | 12 ++++++------ setup.ml | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/META b/lib/META index 508203a07..9169096dc 100644 --- a/lib/META +++ b/lib/META @@ -1,6 +1,6 @@ # OASIS_START -# DO NOT EDIT (digest: 7367801f05869337fe79bbbf8efd97f3) -version = "1.7.0" +# DO NOT EDIT (digest: 895b74cff58e466f0cfbd5943427000b) +version = "1.7.1" description = "A low-level interface to Git in pure OCaml" requires = "mstruct dolog ocamlgraph uri lwt hex stringext crc" archive(byte) = "git.cma" @@ -9,7 +9,7 @@ archive(native) = "git.cmxa" archive(native, plugin) = "git.cmxs" exists_if = "git.cma" package "unix" ( - version = "1.7.0" + version = "1.7.1" description = "A low-level interface to Git in pure OCaml" requires = "git git.http lwt cohttp.lwt lwt.unix conduit.lwt-unix zip nocrypto" @@ -21,7 +21,7 @@ package "unix" ( ) package "top" ( - version = "1.7.0" + version = "1.7.1" description = "Toplevel printers for Git values" requires = "git" archive(byte) = "git_top.cma" @@ -32,7 +32,7 @@ package "top" ( ) package "mirage" ( - version = "1.7.0" + version = "1.7.1" description = "A low-level interface to Git in pure OCaml" requires = "git git.http mirage-types.lwt io-page conduit.mirage dns.mirage mirage-http mirage-flow channel" @@ -44,7 +44,7 @@ package "mirage" ( ) package "http" ( - version = "1.7.0" + version = "1.7.1" description = "A low-level interface to Git in pure OCaml" requires = "git lwt cohttp.lwt uri.services" archive(byte) = "git-http.cma" diff --git a/setup.ml b/setup.ml index e585d521d..fb59dc832 100644 --- a/setup.ml +++ b/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.4.1 *) (* OASIS_START *) -(* DO NOT EDIT (digest: 4052cb1b27dfd0f0f3d3fde9503b687d) *) +(* DO NOT EDIT (digest: d3b62b6dc9b784af30dfaca75ac8a59e) *) (* Regenerated by OASIS v0.4.5 Visit http://oasis.forge.ocamlcore.org for more information and @@ -6861,7 +6861,7 @@ let setup_t = alpha_features = []; beta_features = []; name = "git"; - version = "1.7.0"; + version = "1.7.1"; license = OASISLicense.DEP5License (OASISLicense.DEP5Unit @@ -7304,7 +7304,7 @@ let setup_t = }; oasis_fn = Some "_oasis"; oasis_version = "0.4.5"; - oasis_digest = Some "º\002\000}¥\133Y¸¨\145§Eµ\025×\155"; + oasis_digest = Some "\tI\148¨oÀ{¸b~¸\028a\025âæ"; oasis_exec = None; oasis_setup_args = []; setup_update = false From 1e39fa183ece22920fb8c70d33820a9501058759 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 10 Aug 2015 18:11:53 +0100 Subject: [PATCH 3/6] Update CHANGES --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index c6c9fe71c..adcd03e7c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +### 1.7.1 (2015-08-10) + +* Support cohtpp 0.19.1. (#119, @rgrinberg) +* Revert API break for the Sync functor. Now still takes only a `Store.S` + as parameter. (#120) + ### 1.7.0 (2015-08-06) * Changes to the `Search` API: From 1dcdb406d9f611e0f49703aefe19207aa5c08032 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 10 Aug 2015 18:16:29 +0100 Subject: [PATCH 4/6] Remove version constraint in .travis.yml We don't need to test the constraint boundary anymore. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bfef4d800..19b991239 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ install: wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/ma script: bash -ex .travis-opam.sh env: global: - - PACKAGE=git.1.7.0 + - PACKAGE=git matrix: - OCAML_VERSION=4.01 - OCAML_VERSION=4.02 From 800bc76596400ba7e35ec6d25d8381497a254e51 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 10 Aug 2015 20:01:16 +0100 Subject: [PATCH 5/6] Fix broken links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f2ada175f..d75f4e74f 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ $ opam install git position-independent representation so that they can be manipulated more easily. Pack file can be created but will not be compressed yet. -* The [index file] (http://mirage.github.io/ocaml-git/Index.html) +* The [index file] (https://github.com/samoht/ocaml-git/blob/master/lib/index.mli) (used as for managing the stagging area) are fully supported. Which means that `git diff` and `git status` will work as expected on a repository created by the library. @@ -63,7 +63,7 @@ $ opam install git * An abstraction for Git [Store](http://mirage.github.io/ocaml-git/Store.S.html) is available. Various store implementations are available: - An [in-memory](http://mirage.github.io/ocaml-git/Memory.html) implementation; - - A [unix filesystem](http://mirage.github.io/ocaml-git/Git_unix.FS.html) + - A [unix filesystem](http://mirage.github.io/ocaml-git/Git_unix.S.FS.html) implementation; - A [mirageOS](http://mirage.github.io/ocaml-git/Git_mirage.html) implementation, requiring an `V1_LWT.FS` implementation. From 9731d451aef1374e1c94d76fc742d441926977d9 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 10 Aug 2015 20:02:15 +0100 Subject: [PATCH 6/6] Add an example in the README --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index d75f4e74f..e7d840a13 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,37 @@ $ opam install git Performance is comparable to the Git tool. +### Example + +```ocaml +# require "git.unix";; +# open Lwt.Infix;; +# open Git_unix;; +# module Search = Git.Search(FS);; + +# let read file = + FS.create () >>= fun t -> + FS.read_reference_exn t Git.Reference.master >>= fun head -> + Search.find t (Git.SHA.of_commit head) (`Commit (`Path file)) >>= function + | None -> failwith "file not found" + | Some sha -> FS.read_exn t sha >>= function + | Git.Value.Blob b -> Lwt.return (Git.Blob.to_raw b) + | _ -> failwith "not a valid path" + ;; + val read : string list -> string Lwt.t = + +# Lwt_main.run (read ["README.md"] >|= print_string) + +Pure OCaml low-level bindings to Git -- Guaranteed no C inside. + +Support for on-disk and in-memory Git stores. Can read and write all +the Git objects: the usual blobs, trees, commits and tags but also +the pack files, pack indexes and the index file (where the staging area +lives). + +[...] +``` + ### License MIT, see LICENSE file for its text. \ No newline at end of file