package tezos-context
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-context.helpers/Tezos_context_helpers/Context/Make_proof/argument-1-DB/Head/index.html
Module DB.Head
Managing the store's heads.
list t is the list of all the heads in local store. Similar to git rev-list --all.
find t is the current head of the store t. This works for both persistent and temporary branches. In the case of a persistent branch, this involves getting the the head associated with the branch, so this may block. In the case of a temporary store, it simply returns the current head. Returns None if the store has no contents. Similar to git rev-parse HEAD.
Same as find but raise Invalid_argument if the store does not have any contents.
set t h updates t's contents with the contents of the commit h. Can cause data loss as it discards the current contents. Similar to git reset --hard <hash>.
fast_forward t h is similar to set but the t's head is updated to h only if h is stricly in the future of t's current head. max_depth or n are used to limit the search space of the lowest common ancestors (see lcas).
The result is:
Ok ()if the operation is succesfull;Error `No_changeifhis alreadyt's head;Error `Rejectedifhis not in the strict future oft's head.Error eif the history exploration has been cut before getting useful results. In that case. the operation can be retried using different parameters ofnandmax_depthto get better results.
val merge :
into:t ->
info:Info.f ->
?max_depth:int ->
?n:int ->
commit ->
(unit, Irmin.Merge.conflict) result Lwt.tmerge ~into:t ?max_head ?n commit merges the contents of the commit associated to commit into t. max_depth is the maximal depth used for getting the lowest common ancestor. n is the maximum number of lowest common ancestors. If present, max_depth or n are used to limit the search space of the lowest common ancestors (see lcas).