package git

  1. Overview
  2. Docs

Filesystem trees.

type perm = [
  1. | `Normal
  2. | `Exec
  3. | `Dir
  4. | `Commit
]

File permission.

val pretty_perm : perm -> string

Pretty printing of tree permissions.

val string_of_perm : perm -> string

Raw represention of a permission, using the Git format.

val fixed_length_string_of_perm : perm -> string

Fixed-length raw represention of a permission, using the Git format (6 characters long).

type entry = {
  1. perm : perm;
  2. name : string;
  3. node : Hash.t;
}

A tree entry. This is either a directory or a file. As this is supposed to model a filesystem, directory does not contain data.

type t = entry list

A tree is an hierarchical data-store. NB: data (eg. blobs) are only carried on the leafs.

include S with type t := t
val equal : t -> t -> bool

Are two objects equal?

val hash : t -> int

Hash an object.

val compare : t -> t -> int

Compare two objects.

val pp : t Fmt.t

pp is the pretty-printer for values of type t.

module IO (D : Hash.DIGEST) : IO with type t = t