package git

  1. Overview
  2. Docs

Functor building an implementation of the tag structure. The functor returns a structure containing a type hash of digests and a type t of tags (structurally equal to t).

Parameters

module Hash : sig ... end

Signature

type hash = Hash.t
type nonrec t = hash t
val make : hash -> kind -> ?tagger:User.t -> tag:string -> string option -> t

make hash kind ?tagger ~tag descr makes a new tag with the kind kind by the tagger with the name tag and the description descr.

This function does not check if the reference hash points to an existing kind Git object.

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 : Stdlib.Set.S with type elt = t
module Map : Stdlib.Map.S with type key = t
val length : t -> int64

length t is the length of the given tag object.

val obj : t -> hash

obj t returns the reference of the given tag.

val tag : t -> string

tag t returns the information of the given tag.

val message : t -> string option
val kind : t -> kind
val tagger : t -> User.t option
OCaml

Innovation. Community. Security.