package git

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

A Git Commit object. Which specifies the top-level Tree.t for the snapshot of the project at a point; the author/committer information and the commit message.

val make : tree:Hash.t -> author:User.t -> committer:User.t -> ?parents:Hash.t list -> ?extra:(string * string list) list -> string -> 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 commits. tree should be a hash of a Tree.t object.

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.

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 -> Hash.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 commit object t.

val parents : t -> Hash.t list

parents c returns all parents of the Git Commit object c.

val tree : t -> Hash.t

tree c returns the hash of top-level Tree.t of the Git Commit object c.

val committer : t -> User.t

committer c returns the committer of the commit c.

val author : t -> User.t

author c returns the author of the commit c.

val message : t -> string

message c returns the message of the commit c.

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

compare_by_date a b compares the Git Commit object a and b by the date of the author. The compare function as the same behaviour.

OCaml

Innovation. Community. Security.