package git-unix

  1. Overview
  2. Docs

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

include Git.S with type t = Git.Pack.raw
type t = Git.Pack.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:Git.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:Git.Value.write_inflated -> t -> Git.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:Git.Pack_index.f -> read:Git.Value.read_inflated -> write:Git.Value.write_inflated -> Mstruct.t -> Git.Hash.t -> Git.Value.t option Lwt.t

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

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

Same as read but for inflated values.

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

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

OCaml

Innovation. Community. Security.