package git

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Value.TreeSource

Sourcetype 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).

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

Pretty-printer of entry.

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

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

Sourcetype 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.

Sourceval remove : name:string -> t -> t

remove ~name t is t without the entry name.

Sourceval add : t -> entry -> t

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

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

length t returns the length of the tree object t.

Sourceval hashes : t -> H.t list

hashes t returns all pointer of the tree t.

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