package irmin-git

  1. Overview
  2. Docs
On This Page
  1. Sets and Maps.
Git backend for Irmin

Install

dune-project
 Dependency

Authors

Maintainers

Sources

irmin-3.11.0.tbz
sha256=09996fbcc2c43e117a9bd8e9028c635e81cccb264d5e02d425ab8b06bbacdbdb
sha512=0391a6bf7b94a1edd50a3a8df9e58961739fa78d7d689d61f56bc87144483bad2ee539df595c33d9d52c29b3458da5dddf3a73b5eb85e49c4667c26d2cd46be1

doc/irmin-git.unix/Irmin_git_unix/Maker/argument-1-G/Value/Commit/index.html

Module Value.Commit

type hash = hash
type nonrec t = hash Git.Commit.t
val make : tree:hash -> author:Git.User.t -> committer:Git.User.t -> ?parents:hash list -> ?extra:(string * string list) list -> string option -> t

make ~author ~committer ?parents ~tree msg makes an OCaml value t. ?parents should be a non-empty list and corresponds to a list of hashes of parent commits. tree should be a hash of a Tree.t object.

Note. This function does not write a new commit on the store and does not check the validity of parents and tree. By this way, this function never fails.

val format : t Encore.t

format is a description of how to encode/decode of t object.

val digest : t -> hash

digest t associates a hash to any value of t. It is guaranteed that if x = y or compare x y = 0, then digest x = digest y.

val pp : t Fmt.t

Pretty-printer of t.

val compare : t -> t -> int

The comparison function for t.

val hash : t -> int

hash blob associates a non-negative integer to any value of t. It is guaranteed that if x = y or compare x y = 0, then hash x = hash y.

val equal : t -> t -> bool

The equal function for t.

Sets and Maps.

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 given commit object.

val parents : t -> hash list

parents t returns all parents of the given commit object.

val tree : t -> hash

tree t returns the hash of top-level Tree.t of the given commit object.

val committer : t -> Git.User.t

committer t returns the committer of the given commit object.

val author : t -> Git.User.t

author c returns the author of the given commit object.

val message : t -> string option

message c returns the message of the given commit object.

val extra : t -> (string * string list) list
val compare_by_date : t -> t -> int

compare_by_date a b compares commit objects a and b by the date of the author. The compare function as the same behaviour.