include Git.S
module Hash : sig ... endmodule Inflate : sig ... endmodule Deflate : sig ... endmodule Value : Git.Value.S with module Hash := Hash and module Inflate := Inflate and module Deflate := Deflate and module Blob = Git.Blob.Make(Hash) and module Commit = Git.Commit.Make(Hash) and module Tree = Git.Tree.Make(Hash) and module Tag = Git.Tag.Make(Hash) and type t = Git.Value.Make(Hash)(Inflate)(Deflate).tmodule Reference : Git.Reference.S with module Hash := Hashval default_buffer : unit -> bufferThe default buffer.
val buffer : ?ztmp:Cstruct.t -> ?etmp:Cstruct.t -> ?dtmp:Cstruct.t -> ?raw:Cstruct.t -> ?window:Inflate.window -> unit -> bufferdotgit state returns the current ".git" path used - eg. the default ?dotgit value of create if the client does not notice a specific value.
root state returns the current path of the repository. eg. the default value ?root value of create if the client does not notice a specific value.
val compression : t -> intcompression state returns the current level of the compression used to write a Git object - eg. the default value ?compression value of create if the client does not notice a specific value.
contents state returns an associated list between the hash and its bind git object. This list contains all git objects available in the current git repository state.
val size : t -> Hash.t -> (int64, error) Stdlib.result Lwt.tsize state hash returns the size of the git object which respects the predicate digest(object) = hash. The size is how many byte(s) are needed to store the serialized (but not deflated) git object in bytes (without the header).
read state hash can retrieve a git object from the current repository state. It de-serializes the git object to an OCaml value.
mem state hash checks if one object satisfies the predicate digest(object) = hash.
list state lists all git objects available in the current git repository state.
write state v writes the value v in the git repository state.
val fold : t -> ('acc -> ?name:Git.Path.t -> length:int64 -> Hash.t -> Value.t -> 'acc Lwt.t) -> path:Git.Path.t -> 'acc -> Hash.t -> 'acc Lwt.tfold state f ~path acc hash iters on any git objects reachable by the git object hash which located in path (for example, if you iter on a commit, path should be "." - however, if you iter on a tree, path should be the directory path represented by your tree). For each git objects, we notice the path name (derived from path) if the object is a Blob or a Tree, the length or the git object (see size), the hash and the value.
If the hash points to:
Value.Blob.t:fis called only one time with the OCaml value of the blob.Value.Tree.t:fis called firstly with the Ocaml value of the pointed tree by the hashhash. Then, we iter (and callffor each iteration) in the list of entries of the tree. Finally, we retrieve recursively all sub-tree objects and do an ascending walk.fis never called more than one time for each hash.Value.Commit.t:fis called firstly with the OCaml value of the pointed commit by the hashhash. Then, it follozs recursively all parents of the current commit, Finallym it starts afoldinside the pointed root tree git object of each commit previously retrieved.fnever called more than one time for each hash.Value.Tag.t:fis called firstly with the OCaml value of the pointed tag by the hashhash. Then, it follows the git object pointed by the tag.
Any retrieved error is missed.
module Pack : sig ... endmodule Ref : sig ... endval reset : t -> (unit, error) Stdlib.result Lwt.treset t removes all things of the git repository t and ensures it will be empty.
clear_caches t drops all values stored in the internal caches binded with the git repository t.
read_inflated state hash returns the inflated git object which respect the predicate digest(value) = hash. We return the kind of the object and the inflated value as a Cstruct.t (which the client can take the ownership).
write_inflated state kind raw writes the git object in the git repository state and associates the kind to this object. This function does not verify if the raw data is well-defined (and respects the Git format). Then, this function returns the hash produced from the kind and the inflated raw to let the user to retrieve it.
Backend Features
val v : ?dotgit:Fpath.t -> ?compression:int -> ?buffers:buffer Lwt_pool.t -> Fpath.t -> (t, error) Stdlib.result Lwt.t