Skip to content

Commit

Permalink
Merge pull request #121 from samoht/master
Browse files Browse the repository at this point in the history
Prepare the release
  • Loading branch information
samoht committed Aug 10, 2015
2 parents ad76523 + 9731d45 commit e0ef97b
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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 = <fun>
# 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.
2 changes: 1 addition & 1 deletion _oasis
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 6 additions & 6 deletions lib/META
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions setup.ml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e0ef97b

Please sign in to comment.