package irmin

  1. Overview
  2. Docs
On This Page
  1. Commit History
Legend:
Library
Module
Module type
Parameter
Class
Class type

History specifies the signature for commit history. The history is represented as a partial-order of commits and basic functions to search through that history are provided.

Every commit can point to an entry point in a node graph, where user-defined contents are stored.

Commit History

type t

The type for store handles.

type node

The type for node values.

type commit

The type for commit values.

val create : t -> ?node:node -> parents:commit list -> task:task -> commit Lwt.t

Create a new commit.

val node : t -> commit -> node option Lwt.t

Get the commit node.

A commit might contain a graph node.

val parents : t -> commit -> commit list Lwt.t

Get the commit parents.

Commits form a append-only, fully functional, partial-order data-structure: every commit carries the list of its immediate predecessors.

val merge : t -> task:task -> commit Merge.t

merge t is the 3-way merge function for commit.

val lcas : t -> ?max_depth:int -> ?n:int -> commit -> commit -> [ `Ok of commit list | `Max_depth_reached | `Too_many_lcas ] Lwt.t

Find the lowest common ancestors lca between two commits.

val lca : t -> task:task -> ?max_depth:int -> ?n:int -> commit list -> commit option Merge.result Lwt.t

Compute the lowest common ancestors ancestor of a list of commits by recursively calling lcas and merging the results.

If one of the merges results in a conflict, or if a call to lcas returns either `Max_depth_reached or `Too_many_lcas then the function returns None.

val three_way_merge : t -> task:task -> ?max_depth:int -> ?n:int -> commit -> commit -> commit Merge.result Lwt.t

Compute the lcas of the two commit and 3-way merge the result.

val closure : t -> min:commit list -> max:commit list -> commit list Lwt.t

Same as GRAPH.closure but for the history graph.

module Store : sig ... end

A history forms a store of commits.

OCaml

Innovation. Community. Security.