package irmin-mem

  1. Overview
  2. Docs

Commit defines immutable objects to describe store updates.

type t = commit

The type for store commits.

val t : repo -> t Irmin.Type.t

t is the value type for t.

val pp : t Fmt.t

pp is the pretty-printer for commit. Display only the hash.

val of_string : repo -> string -> (t, [ `Msg of string ]) Result.result

of_string r str parsing the commit from the string str, using the base repository r.

val v : repo -> info:Irmin.Info.t -> parents:commit list -> tree -> commit Lwt.t

v r i ~parents:p t is the commit c such that:

  • info c = i
  • parents c = p
  • tree c = t
val tree : commit -> tree Lwt.t

tree c is c's root tree.

val parents : commit -> commit list Lwt.t

parents c are c's parents.

val info : commit -> Irmin.Info.t

info c is c's info.

Import/Export

Hash provides base functions for commit hashes.

val hash : commit -> Hash.t

hash c it c's hash.

val of_hash : repo -> Hash.t -> commit option Lwt.t

of_hash r h is the the commit object in r having h as hash, or None is no such commit object exists.

OCaml

Innovation. Community. Security.