package datakit-github

  1. Overview
  2. Docs
type name = string list

The type for reference names. "heads/master" is represented as "heads";"master".

type t = private {
  1. head : Commit.t;
  2. name : string list;
}

The type for Git references.

val v : Commit.t -> name -> t

v head name is a fresh t with the head commit and name. name should only contain alpha-numeric character, '_' and '-'.

val pp : t Fmt.t

pp is the pretty-printer for references.

val pp_name : name Fmt.t

pp_name ["a";"b";"c"] is "a/b/c"

val compare : t -> t -> int

compare compares Git references.

type id = Repo.t * name

The type for Git reference IDs.

val pp_id : id Fmt.t

pp_id is the pretty-printer for Git reference IDs.

val id : t -> id

id t is t's ID.

val name : t -> name

name t is t's name.

val repo : t -> Repo.t

repo t is t's repository.

val commit : t -> Commit.t

commit t is t's commit.

val commit_hash : t -> string

commit_hash t is t's commit SHA1.

val same_id : t -> t -> bool

same_id x y is true if x and y have the same ID.

val compare_id : id -> id -> int

compare_id x y compares the Git reference IDs x and y.

module Set : sig ... end

Sets of Git references.

module IdSet : SET with type elt = id
type event = [
  1. | `Created of t
  2. | `Updated of t
  3. | `Removed of id
]

The type for reference events' state.

val pp_event : event Fmt.t

pp_event is the pretty-printer for reference events' state.

module Index : MAP with type key = id

Maps indexed by Git reference IDs.

val index : Set.t -> t Index.t Repo.Map.t

index s indexes s by Git reference IDs.

OCaml

Innovation. Community. Security.