package irmin-git

  1. Overview
  2. Docs
On This Page
  1. Sets and Maps.
Git backend for Irmin

Install

dune-project
 Dependency

Authors

Maintainers

Sources

irmin-3.6.1.tbz
sha256=11fc2570bdbfd48478c89113fc801084a84a9a2c12d9bf8c64e05ce64ae19bd7
sha512=2171699ca24dec5c9c908a2676b272e034c14eb17f7052a794535e52af0be40be68a689e59c0a640ee244b11703320483f4d0c261542e6242ba23a8f1272b9b0

doc/irmin-git.unix/Irmin_git_unix/Maker/argument-1-G/Value/index.html

Module G.Value

type hash = hash
type nonrec t = hash Git.Value.t

OCaml value which represents a Git object.

module Blob : Git.Blob.S with type hash = hash
module Commit : Git.Commit.S with type hash = hash
module Tree : Git.Tree.S with type hash = hash
module Tag : Git.Tag.S with type hash = hash
val blob : Blob.t -> t
val commit : Commit.t -> t
val tree : Tree.t -> t
val tag : Tag.t -> t
val kind : t -> [ `Commit | `Blob | `Tree | `Tag ]

kind o returns the kind of the Git object.

val format : t Encore.t
val digest : t -> hash

digest t associates a hash to any value of t. It is guaranteed that if x = y or compare x y = 0, then digest x = digest y.

val pp : t Fmt.t

Pretty-printer of t.

val compare : t -> t -> int

The comparison function for t.

val hash : t -> int

hash blob associates a non-negative integer to any value of t. It is guaranteed that if x = y or compare x y = 0, then hash x = hash y.

val equal : t -> t -> bool

The equal function for t.

Sets and Maps.

module Set : Set.S with type elt = t
module Map : Map.S with type key = t
val length : t -> int64
val length_with_header : t -> int64

length_with_header t is length t plus the length of the header.

val to_raw : t -> string
val to_raw_without_header : t -> string
val of_raw_with_header : ?off:int -> ?len:int -> string -> (t, [> `Msg of string ]) result
val of_raw : kind:[ `Commit | `Blob | `Tree | `Tag ] -> Cstruct.t -> (t, [> `Msg of string ]) result
val stream : t -> unit -> string option Lwt.t