Value.Commit
type hash = hash
val make :
tree:hash ->
author:User.t ->
committer: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.
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 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
.
module Set : Stdlib.Set.S with type elt = t
module Map : Stdlib.Map.S with type key = t
val length : t -> int64
length t
returns the length 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