Module Api.Ref

A Ref as an indirect way of referring to a commit.

type mr_info = {
  1. id : int;
  2. base : string;
  3. title : string;
  4. body : string;
}
type t = [
  1. | `Ref of string
  2. | `MR of mr_info
]

t is a regular git ref or a merge request record of mr_info.

type id = [
  1. | `Ref of string
  2. | `MR of int
]

Id as a regular git ref or a merge request.

This is intended to be used by a user when a t type is manipulated by the API.

val pp : t Fmt.t

Pretty print t.

val compare : t -> t -> int
val to_git : t -> string

to_git t is the Git-format string of the ref, e.g."refs/pull/%d/head"