package git-unix

  1. Overview
  2. Docs
Virtual package to install and configure ocaml-git's Unix backend

Install

dune-project
 Dependency

Authors

Maintainers

Sources

git-2.1.3.tbz
sha256=5d614ae0404a2438c5cee98bf4aa64cee9980e2a382a437acd6ee65dcca6f4de
sha512=9a863552ad7fddfa37d92738dd1c793e888a3c544f97a7634aa9ed5cef1ca22db4e6bfa1908c58986af0bf1dcd665ba63308c1656e68397b7a87f1a09e94fe97

doc/git-unix/Git_unix/Store/IEnc/index.html

Module Store.IEnc

type error

The type error. We can't have an error to serialize an IDX file - it's just to homogenize interfaces each others.

val pp_error : error Fmt.t

Pretty-printer of error.

type t

The encoder state.

val pp : t Fmt.t

Pretty-printer of the encoder t.

type 'a sequence = ('a -> unit) -> unit

An abstract representation of an iterative container.

val default : (Hash.t * (Checkseum.Crc32.t * int64)) sequence -> Hash.t -> t

default seq pack_hash makes a new encoder to serialize seq and associates the IDX stream produced with the pack_hash PACK file. This function takes care about the order of seq, so the client does not need to sort the iterative container.

val flush : int -> int -> t -> t

flush off len t provides t with len bytes to write, starting at off. This byte range is written by calls to eval with t until `Flush is returned. Use used_out to know how many byte t wrote.

val used_out : t -> int

used_out t returns how many byte t wrote in the current buffer noticed to the previous call of eval.

val eval : Cstruct.t -> t -> [ `Flush of t | `End of t | `Error of t * error ]

eval dst t is:

  • `Flush t iff t needs more output storage. The client must use flush to provide a new buffer and then call eval with `Flush until `End is returned.
  • `End t when the encoder is done. t sticks to this situation. The client can remove it.
  • `Error (t, exn) iff the encoder meet an error exn. The encoder can't continue and sticks in this situation.