Commit.HistoryBuild a commit history.
type 'a t = 'a C.tThe type for store handles.
type node_key = C.Node.keyThe type for node keys.
type commit_key = C.keyThe type for commit keys.
val commit_key_t : commit_key Type.ttype v = C.Val.tThe type for commit objects.
type info = C.Info.tThe type for commit info.
val v :
[> Perms.write ] t ->
node:node_key ->
parents:commit_key list ->
info:info ->
(commit_key * v) Lwt.tCreate a new commit.
val parents : [> Perms.read ] t -> commit_key -> commit_key list Lwt.tGet 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 :
[> Perms.read_write ] t ->
info:(unit -> info) ->
commit_key Merge.tmerge t is the 3-way merge function for commit.
val lcas :
[> Perms.read ] t ->
?max_depth:int ->
?n:int ->
commit_key ->
commit_key ->
(commit_key list, [ `Max_depth_reached | `Too_many_lcas ]) Stdlib.result
Lwt.tFind the lowest common ancestors lca between two commits.
val lca :
[> Perms.read_write ] t ->
info:(unit -> info) ->
?max_depth:int ->
?n:int ->
commit_key list ->
(commit_key option, Merge.conflict) Stdlib.result Lwt.tval three_way_merge :
[> Perms.read_write ] t ->
info:(unit -> info) ->
?max_depth:int ->
?n:int ->
commit_key ->
commit_key ->
(commit_key, Merge.conflict) Stdlib.result Lwt.tCompute the lcas of the two commit and 3-way merge the result.
val closure :
[> Perms.read ] t ->
min:commit_key list ->
max:commit_key list ->
commit_key list Lwt.tSame as Node.Graph.closure but for the history graph.
val iter :
[> Perms.read ] t ->
min:commit_key list ->
max:commit_key list ->
?commit:(commit_key -> unit Lwt.t) ->
?edge:(commit_key -> commit_key -> unit Lwt.t) ->
?skip:(commit_key -> bool Lwt.t) ->
?rev:bool ->
unit ->
unit Lwt.tSame as Node.Graph.iter but for traversing the history graph.