package git

  1. Overview
  2. Docs

Raw pack file: they contains a pack index and a list of position-dependant deltas.

include S with type t = raw
type t = raw

The type for the given Git object.

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 add : [ `Not_defined ]

Pack.Raw.add is not defined. Use Buffer instead.

val input : ?progress:(string -> unit) -> read:Value.read_inflated -> Mstruct.t -> t Lwt.t

input ~read buf is the raw pack and raw index obtained by reading the buffer buf. External (shallow) Hash1 references are resolved using the read function; these references are needed to unpack the list of values stored in the pack file, to then compute the full raw index.

val unpack : ?progress:(string -> unit) -> write:Value.write_inflated -> t -> Hash.Set.t Lwt.t

Unpack a whole pack file on disk (by calling write on every values) and return the Hash1s of the written objects.

val read : index:Pack_index.f -> read:Value.read_inflated -> write:Value.write_inflated -> Mstruct.t -> Hash.t -> Value.t option Lwt.t

Same as the top-level read function but for raw packs.

val read_inflated : index:Pack_index.f -> read:Value.read_inflated -> write:Value.write_inflated -> Mstruct.t -> Hash.t -> string option Lwt.t

Same as read but for inflated values.

val size : index:Pack_index.f -> Mstruct.t -> Hash.t -> int option Lwt.t

size ~index buf h is the (uncompressed) size of h.


Innovation. Community. Security.