package irmin-pack
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=11fc2570bdbfd48478c89113fc801084a84a9a2c12d9bf8c64e05ce64ae19bd7
    
    
  sha512=2171699ca24dec5c9c908a2676b272e034c14eb17f7052a794535e52af0be40be68a689e59c0a640ee244b11703320483f4d0c261542e6242ba23a8f1272b9b0
    
    
  doc/irmin-pack.unix/Irmin_pack_unix/Maker/Make/Head/index.html
Module Make.HeadSource
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_changeif- his already- t's head;
- Error `Rejectedif- his not in the strict future of- t'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 of- nand- max_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).