package irmin

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

Build a commit history.

Parameters

module N : Contents.STORE
module S : STORE with type Val.node = N.key

Signature

Commit History

type t = N.t * S.t

The type for store handles.

type node = N.key

The type for node values.

type commit = S.key

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.