package git-unix

  1. Overview
  2. Docs
include Git.S with type t = Git.Pack.t
type t = Git.Pack.t

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 : ?level:int -> t -> Git.Pack_index.raw * Cstruct.t

Serialize a pack file into a list of buffers. Return the corresponding raw index.

val input : ?progress:(string -> unit) -> index:Git.Pack_index.f -> keys:Git.Hash.Set.t -> read:Git.Value.read_inflated -> Mstruct.t -> t Lwt.t

The usual Object.S.input function, but with additionals index and keys arguments to speed-up ramdom accesses and read to read shallow objects external to the pack file.

val read : t -> Git.Hash.t -> Git.Value.t option

Return the value stored in the pack file.

val read_exn : t -> Git.Hash.t -> Git.Value.t

Return the value stored in the pack file.

val create : (Git.Hash.t * Git.Value.t) list -> t

Create a (not very well compressed) pack file.

module Raw : sig ... end

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

type raw = Raw.t

The type for raw packs.

val of_raw : ?progress:(string -> unit) -> Raw.t -> t Lwt.t

Transform a raw pack file into a position-independant pack file.

val to_raw : t -> Raw.t

Transform a position-independant pack file into a raw pack and index files.