package irmin

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

Build a commit history.

Parameters

module S : STORE

Signature

Commit History

type 'a t = 'a S.t

The type for store handles.

type node = S.Node.key

The type for node values.

type commit = S.key

The type for commit values.

type v

The type for commit objects.

val v : [> `Write ] t -> node:node -> parents:commit list -> info:Info.t -> (commit * v) Lwt.t

Create a new commit.

val parents : [> `Read ] 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 : [ `Read | `Write ] t -> info:Info.f -> commit Merge.t

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

val lcas : [> `Read ] t -> ?max_depth:int -> ?n:int -> commit -> commit -> (commit list, [ `Max_depth_reached | `Too_many_lcas ]) result Lwt.t

Find the lowest common ancestors lca between two commits.

val lca : [ `Read | `Write ] t -> info:Info.f -> ?max_depth:int -> ?n:int -> commit list -> (commit option, Merge.conflict) 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 Error `Max_depth_reached or Error `Too_many_lcas then the function returns the same error.

val three_way_merge : [ `Read | `Write ] t -> info:Info.f -> ?max_depth:int -> ?n:int -> commit -> commit -> (commit, Merge.conflict) result Lwt.t

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

val closure : [> `Read ] t -> min:commit list -> max:commit list -> commit list Lwt.t

Same as GRAPH.closure but for the history graph.

Value Types

val commit_t : commit Type.t

commit_t is the value type for commit.