Compare commits
5 commits
6d71d1f78f
...
72b9d05aa5
Author | SHA1 | Date | |
---|---|---|---|
72b9d05aa5 | |||
f5281fbcb1 | |||
3276c90b08 | |||
60795e65e2 | |||
56eceb1ef2 |
3 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
# v0.1.1 2024-11-28 - Vig (Denmark)
|
||||||
|
|
||||||
|
- Remove unused code from test setup (!4 - @hannesm)
|
||||||
|
- **BUG FIX**: of_octets: create ring buffer earlier to avoid missing data (!5 - @hanensm, review by @dinosaure @reynir)
|
||||||
|
- Add function `commit : t -> Digestif.SHA1.t option` (!6 !8 - @hannesm @reynir, review by @dinosaure)
|
||||||
|
|
||||||
# v0.1.0 2024-10-29 - Berlin (Germany) and Bamenda (Cameroon)
|
# v0.1.0 2024-10-29 - Berlin (Germany) and Bamenda (Cameroon)
|
||||||
|
|
||||||
- Refine change_and_push semantics (fixing on GitHub #1 #2 - @reynir @dinosaure @hannesm git.robur.coop #2)
|
- Refine change_and_push semantics (fixing on GitHub #1 #2 - @reynir @dinosaure @hannesm git.robur.coop #2)
|
||||||
|
|
|
@ -109,6 +109,14 @@ let connect ctx endpoint =
|
||||||
|
|
||||||
let branch t = t.branch
|
let branch t = t.branch
|
||||||
|
|
||||||
|
let commit t =
|
||||||
|
match t.head, t.committed with
|
||||||
|
| None, _ -> None
|
||||||
|
| Some commit, None -> Some (`Clean commit)
|
||||||
|
| Some commit, Some _ ->
|
||||||
|
(* XXX: this is not precise as we can have made zero changes *)
|
||||||
|
Some (`Dirty commit)
|
||||||
|
|
||||||
type key = Mirage_kv.Key.t
|
type key = Mirage_kv.Key.t
|
||||||
|
|
||||||
type change = [
|
type change = [
|
||||||
|
|
|
@ -43,6 +43,11 @@ val connect : Mimic.ctx -> string -> t Lwt.t
|
||||||
val branch : t -> Git.Reference.t
|
val branch : t -> Git.Reference.t
|
||||||
(** [branch t] returns the branch used by the given [t]. *)
|
(** [branch t] returns the branch used by the given [t]. *)
|
||||||
|
|
||||||
|
val commit : t -> [ `Clean of Digestif.SHA1.t | `Dirty of Digestif.SHA1.t ] option
|
||||||
|
(** [commit t] returns the commit used by the given [t]. The commit is either
|
||||||
|
marked [`Dirty _] if we're inside a [change_and_push] or [`Clean _]
|
||||||
|
otherwise. *)
|
||||||
|
|
||||||
val to_octets : ?level:int -> t -> string Lwt_stream.t
|
val to_octets : ?level:int -> t -> string Lwt_stream.t
|
||||||
(** [to_octets ?level store] returns a serialized version of the given [store].
|
(** [to_octets ?level store] returns a serialized version of the given [store].
|
||||||
[level] is the {i zlib} level compression used for Git object (between [0]
|
[level] is the {i zlib} level compression used for Git object (between [0]
|
||||||
|
|
Loading…
Reference in a new issue