From a8ab45f2bec5ca0d07edf5215e9ce31a57a9895d Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Wed, 15 Mar 2023 11:43:36 +0100 Subject: [PATCH] Add the branch accessor --- src/git_kv.ml | 2 ++ src/git_kv.mli | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/git_kv.ml b/src/git_kv.ml index 854e1e6..d46fec2 100644 --- a/src/git_kv.ml +++ b/src/git_kv.ml @@ -107,6 +107,8 @@ let connect ctx endpoint = let _r = to_invalid r in Lwt.return t +let branch t = t.branch + type key = Mirage_kv.Key.t type change = [ diff --git a/src/git_kv.mli b/src/git_kv.mli index 77d2eb7..97c456a 100644 --- a/src/git_kv.mli +++ b/src/git_kv.mli @@ -40,6 +40,8 @@ val connect : Mimic.ctx -> string -> t Lwt.t @raise [Invalid_argument _] if we can not initialize the store, or if we can not fetch the given [remote]. *) +val branch : t -> Git.Reference.t + val to_octets : t -> string Lwt.t (** [to_octets store] returns a serialized version of the given [store]. *)