package git

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

The Helper module should mnot be used by the client but only by maintainers of ocaml-git. It provides useful functions to interact with any I/O operations.

val ppe : name:string -> 'a Fmt.t -> 'a Fmt.t

ppe ~name pp make a new pretty-printer which shows your value like "(name %a)" pp value.

module Pair : sig ... end
module Option : sig ... end
module BaseIso : sig ... end

Helper for some convenience bijection elements.

module MakeDecoder (A : sig ... end) : sig ... end

MakeDecoder makes a module which respects the interface S.DECODER from an angstrom decoder.

module MakeInflater (Z : sig ... end) (A : sig ... end) : sig ... end

MakeInflater makes a module which respects the interface S.DECODER from an angstrom decoder and an inflate implementation.

module MakeEncoder (M : sig ... end) : sig ... end

MakeEncoder makes a module which respects the interface S.ENCODER from a S.MINIENC.encoder. This module (instead MakeEncoder allocates one buffer from a size specified by the user. However this size must be a power of two.

module MakeDeflater (Z : sig ... end) (M : sig ... end) : sig ... end

MakeDeflater makes a module which respects the interface S.ENCODER from a S.MINIENC.encoder. As MakeEncoder, this module allocates one buffer from a size specified by the user. However this size must be a power of two.

val digest : (module Git__.S.HASH with type t = 'hash) -> (module Git__.S.ENCODER with type error = Error.never and type init = Cstruct.t * 't and type t = 't) -> etmp:Cstruct.t -> tmp:Cstruct.t -> kind:string -> length:('t -> int64) -> 't -> 'hash

fdigest (module Hash) (module Encoder) ?capacity ~tmp ~kind ~length value digests value with the Hash implementation and use the Encoder to stream on the Hash.digest function.

?capacity is the size of the internal buffer used to serialize your value (must be a power of two).

kind is the kind of the value (Commit, Blob, etc.) to make the Git header in top of the serialized value.

length is the function which calculate the weight of the value when it is serialized.

tmp is aan internal buffer used to store the stream of the encoder and used by Hash.digest.

module type ENCODER = sig ... end
module type DECODER = sig ... end
module Decoder (D : DECODER) (FS : sig ... end) : sig ... end
module Encoder (E : ENCODER) (FS : sig ... end) : sig ... end
module FS (FS : sig ... end) : sig ... end