package git

  1. Overview
  2. Docs
type kind =
  1. | Raw of string
and t = {
  1. kind : kind;
  2. hash : Hash.t;
  3. shallow : bool;
  4. mutable raw : string option;
}

The type for postition-independant packed values. See S.PIC.

include S with type t := t
val equal : t -> t -> bool

Are two objects equal?

val hash : t -> int

Hash an object.

val compare : t -> t -> int

Compare two objects.

val pp : t Fmt.t

pp is the pretty-printer for values of type t.

val create : ?raw:string -> ?shallow:bool -> Hash.t -> kind -> t

Create a position-independent packed value. By default, shallow is false.

val of_raw : ?shallow:bool -> Hash.t -> string -> t

of_raw sha1 raw is the position-independant packed value built by parsing raw. By default shallow is false.

val kind : t -> kind

kind t is t's kind.

val name : t -> Hash.t

name t is t's name.

val raw : t -> string option

raw t is t's raw represation.

val shallow : t -> bool

shallow t is true iff t is not included in the pack file.

val unpack_kind : kind -> string

Unpack a PIC kind into a string.

val unpack : t -> string

Unpack a PICK value into a string.

OCaml

Innovation. Community. Security.