val mem : t -> Reference.t -> bool Lwt.t
mem state ref
is true
iff ref
exists in state
, otherwise it is false
.
val graph : t -> (Hash.t Reference.Map.t, error) Stdlib.result Lwt.t
graph state
is the graph containing all the references and their relationship in the current git repository state
.
val normalize : Hash.t Reference.Map.t -> Reference.head_contents -> (Hash.t, error) Stdlib.result Lwt.t
normalize graph ref
is the final hash pointed by the reference ref
. This function can return an error:
`Invalid_reference ref
if, from the graphgraph
, we don't find the final pointed hash. This case can appear if the graph is not complete or if the link is broken.
val list : t -> (Reference.t * Hash.t) list Lwt.t
val remove : t -> Reference.t -> (unit, error) Stdlib.result Lwt.t
remove state reference
removes the reference reference
from the git repository state
.
val read : t -> Reference.t -> (Reference.head_contents, error) Stdlib.result Lwt.t
read state reference
is the value contained in the reference reference
(available in the git repository state
).
val resolve : t -> Reference.t -> (Hash.t, error) Stdlib.result Lwt.t
val write : t -> Reference.t -> Reference.head_contents -> (unit, error) Stdlib.result Lwt.t
write state reference value
writes the value value
in the the reference
in the git repository state
.