Skip to content

Commit e0ef97b

Browse files
committed
Merge pull request #121 from samoht/master
Prepare the release
2 parents ad76523 + 9731d45 commit e0ef97b

File tree

6 files changed

+50
-13
lines changed

6 files changed

+50
-13
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ install: wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/ma
33
script: bash -ex .travis-opam.sh
44
env:
55
global:
6-
- PACKAGE=git.1.7.0
6+
- PACKAGE=git
77
matrix:
88
- OCAML_VERSION=4.01
99
- OCAML_VERSION=4.02

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### 1.7.1 (2015-08-10)
2+
3+
* Support cohtpp 0.19.1. (#119, @rgrinberg)
4+
* Revert API break for the Sync functor. Now still takes only a `Store.S`
5+
as parameter. (#120)
6+
17
### 1.7.0 (2015-08-06)
28

39
* Changes to the `Search` API:

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $ opam install git
4747
position-independent representation so that they can be manipulated
4848
more easily. Pack file can be created but will not be compressed yet.
4949

50-
* The [index file] (http://mirage.github.io/ocaml-git/Index.html)
50+
* The [index file] (https://github.com/samoht/ocaml-git/blob/master/lib/index.mli)
5151
(used as for managing the stagging area)
5252
are fully supported. Which means that `git diff` and `git status`
5353
will work as expected on a repository created by the library.
@@ -63,7 +63,7 @@ $ opam install git
6363
* An abstraction for Git [Store](http://mirage.github.io/ocaml-git/Store.S.html)
6464
is available. Various store implementations are available:
6565
- An [in-memory](http://mirage.github.io/ocaml-git/Memory.html) implementation;
66-
- A [unix filesystem](http://mirage.github.io/ocaml-git/Git_unix.FS.html)
66+
- A [unix filesystem](http://mirage.github.io/ocaml-git/Git_unix.S.FS.html)
6767
implementation;
6868
- A [mirageOS](http://mirage.github.io/ocaml-git/Git_mirage.html) implementation,
6969
requiring an `V1_LWT.FS` implementation.
@@ -79,6 +79,37 @@ $ opam install git
7979

8080
Performance is comparable to the Git tool.
8181

82+
### Example
83+
84+
```ocaml
85+
# require "git.unix";;
86+
# open Lwt.Infix;;
87+
# open Git_unix;;
88+
# module Search = Git.Search(FS);;
89+
90+
# let read file =
91+
FS.create () >>= fun t ->
92+
FS.read_reference_exn t Git.Reference.master >>= fun head ->
93+
Search.find t (Git.SHA.of_commit head) (`Commit (`Path file)) >>= function
94+
| None -> failwith "file not found"
95+
| Some sha -> FS.read_exn t sha >>= function
96+
| Git.Value.Blob b -> Lwt.return (Git.Blob.to_raw b)
97+
| _ -> failwith "not a valid path"
98+
;;
99+
val read : string list -> string Lwt.t = <fun>
100+
101+
# Lwt_main.run (read ["README.md"] >|= print_string)
102+
103+
Pure OCaml low-level bindings to Git -- Guaranteed no C inside.
104+
105+
Support for on-disk and in-memory Git stores. Can read and write all
106+
the Git objects: the usual blobs, trees, commits and tags but also
107+
the pack files, pack indexes and the index file (where the staging area
108+
lives).
109+
110+
[...]
111+
```
112+
82113
### License
83114

84115
MIT, see LICENSE file for its text.

_oasis

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OASISFormat: 0.4
22
Name: git
3-
Version: 1.7.0
3+
Version: 1.7.1
44
Synopsis: A low-level interface to Git in pure OCaml
55
Authors: Thomas Gazagnaire
66
License: ISC

lib/META

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: 7367801f05869337fe79bbbf8efd97f3)
3-
version = "1.7.0"
2+
# DO NOT EDIT (digest: 895b74cff58e466f0cfbd5943427000b)
3+
version = "1.7.1"
44
description = "A low-level interface to Git in pure OCaml"
55
requires = "mstruct dolog ocamlgraph uri lwt hex stringext crc"
66
archive(byte) = "git.cma"
@@ -9,7 +9,7 @@ archive(native) = "git.cmxa"
99
archive(native, plugin) = "git.cmxs"
1010
exists_if = "git.cma"
1111
package "unix" (
12-
version = "1.7.0"
12+
version = "1.7.1"
1313
description = "A low-level interface to Git in pure OCaml"
1414
requires =
1515
"git git.http lwt cohttp.lwt lwt.unix conduit.lwt-unix zip nocrypto"
@@ -21,7 +21,7 @@ package "unix" (
2121
)
2222

2323
package "top" (
24-
version = "1.7.0"
24+
version = "1.7.1"
2525
description = "Toplevel printers for Git values"
2626
requires = "git"
2727
archive(byte) = "git_top.cma"
@@ -32,7 +32,7 @@ package "top" (
3232
)
3333

3434
package "mirage" (
35-
version = "1.7.0"
35+
version = "1.7.1"
3636
description = "A low-level interface to Git in pure OCaml"
3737
requires =
3838
"git git.http mirage-types.lwt io-page conduit.mirage dns.mirage mirage-http mirage-flow channel"
@@ -44,7 +44,7 @@ package "mirage" (
4444
)
4545

4646
package "http" (
47-
version = "1.7.0"
47+
version = "1.7.1"
4848
description = "A low-level interface to Git in pure OCaml"
4949
requires = "git lwt cohttp.lwt uri.services"
5050
archive(byte) = "git-http.cma"

setup.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(* setup.ml generated for the first time by OASIS v0.4.1 *)
22

33
(* OASIS_START *)
4-
(* DO NOT EDIT (digest: 4052cb1b27dfd0f0f3d3fde9503b687d) *)
4+
(* DO NOT EDIT (digest: d3b62b6dc9b784af30dfaca75ac8a59e) *)
55
(*
66
Regenerated by OASIS v0.4.5
77
Visit http://oasis.forge.ocamlcore.org for more information and
@@ -6861,7 +6861,7 @@ let setup_t =
68616861
alpha_features = [];
68626862
beta_features = [];
68636863
name = "git";
6864-
version = "1.7.0";
6864+
version = "1.7.1";
68656865
license =
68666866
OASISLicense.DEP5License
68676867
(OASISLicense.DEP5Unit
@@ -7304,7 +7304,7 @@ let setup_t =
73047304
};
73057305
oasis_fn = Some "_oasis";
73067306
oasis_version = "0.4.5";
7307-
oasis_digest = Some "º\002\000\133Y¸¨\145§Eµ\025×\155";
7307+
oasis_digest = Some "\tI\148¨oÀ{¸b~¸\028a\025âæ";
73087308
oasis_exec = None;
73097309
oasis_setup_args = [];
73107310
setup_update = false

0 commit comments

Comments
 (0)