package git

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

Module Git.HelperSource

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.

Sourceval 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.

Sourcemodule Pair : sig ... end
Sourcemodule Option : sig ... end
Sourcemodule BaseIso : sig ... end

Helper for some convenience bijection elements.

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

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

Sourcemodule 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.

Sourcemodule 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.

Sourcemodule 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.

Sourceval 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.

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