package git

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type perm = [
  1. | `Normal
    (*

    A Blob.t.

    *)
  2. | `Everybody
  3. | `Exec
    (*

    An executable.

    *)
  4. | `Dir
    (*

    A sub-Tree.t.

    *)
  5. | `Commit
    (*

    A sub-module (Commit.t).

    *)
]
type entry = private {
  1. perm : perm;
  2. name : string;
  3. node : H.t;
}
val pp_entry : entry Fmt.t

Pretty-printer of entry.

val entry : string -> perm -> H.t -> entry

entry name perm node is a new entry. Raise Invalid_argument if name contains '\000'.

type t

A Git Tree object. Git stores content in a manner similar to a UNIX filesystem, but a bit simplified. All the content is stored as tree and Blob.t objects, with trees corresponding to UNIX directory entries and blobs corresponding more or less to inodes or file contents. A single tree object contains one or more tree entries, each of which contains a hash pointer to a Blob.t or sub-tree with its associated mode, type, and filename.

val remove : name:string -> t -> t

remove ~name t is t without the entry name.

val add : t -> entry -> t

add t e is t with the addition of the enty e.

val is_empty : t -> bool
val perm_of_string : string -> perm
val string_of_perm : perm -> string
module MakeMeta (Meta : Encore.Meta.S) : sig ... end
module A : sig ... end
module M : sig ... end
module D : sig ... end
module E : sig ... end
val digest : t -> H.t
val pp : t Fmt.t
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
module Set : Set.S with type elt = t
module Map : Map.S with type key = t
val length : t -> int64

length t returns the length of the tree object t.

val hashes : t -> H.t list

hashes t returns all pointer of the tree t.

val to_list : t -> entry list
val of_list : entry list -> t
val iter : (entry -> unit) -> t -> unit
OCaml

Innovation. Community. Security.