package git-unix
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=5d614ae0404a2438c5cee98bf4aa64cee9980e2a382a437acd6ee65dcca6f4de
sha512=9a863552ad7fddfa37d92738dd1c793e888a3c544f97a7634aa9ed5cef1ca22db4e6bfa1908c58986af0bf1dcd665ba63308c1656e68397b7a87f1a09e94fe97
doc/git-unix/Git_unix/Store/Reference/index.html
Module Store.Reference
The Reference module, which represents the Git reference.
include Git.Reference.S with module Hash := Hash
type nonrec t = Git.Reference.tmodule P : sig ... endval head : tval master : tval is_head : t -> boolval of_string : string -> tval to_string : t -> stringval of_path : Git.Path.t -> tval to_path : t -> Git.Path.tval hash : t -> intval pp_head_contents : head_contents Fmt.tPretty-printer of head_contents.
val equal_head_contents : head_contents -> head_contents -> boolequal_head_contents a b implies a = Ref a' and b = Ref b' and Reference.equal a' b' = true or a = Hash a' and b = Hash b' and Hash.equal a' b'.
However, semantically Ref a' could be equal to Hash b' iff Hash b' is come from the reference a'. That means this function does not handle any indirection when it tests your values.
val compare_head_contents : head_contents -> head_contents -> intmodule A : sig ... endmodule M : sig ... endmodule D : sig ... endmodule E : sig ... endThe type of error.
mem ~fs ~root reference is true iff reference can be found in the git repository root. Otherwise, it is false.
val read :
fs:Fs.t ->
root:Fpath.t ->
t ->
dtmp:Cstruct.t ->
raw:Cstruct.t ->
(head_contents, error) result Lwt.tread ~fs ~root reference dtmp raw is the value of the reference reference (available in the git repository root). dtmp and raw are buffers used by the decoder (respectively for the decoder as an internal buffer and the input buffer).
This function can returns an error.
val write :
fs:Fs.t ->
root:Fpath.t ->
temp_dir:Fpath.t ->
etmp:Cstruct.t ->
raw:Cstruct.t ->
t ->
head_contents ->
(unit, error) result Lwt.twrite ~fs ~root ~raw reference value writes the value value in the mutable representation of the reference in the git repository root. raw is a buffer used by the decoder to keep the input.
This function can returns an error.