val name : t -> string
name t is
head t is the current head of the branch, or
None if it doesn't currently exist.
val wait_for_head : t -> ?switch:Lwt_switch.t -> ( Commit.t option -> [ `Finish of 'a | `Again | `Abort ] result ) -> [ `Abort | `Finish of 'a ] result
wait_for_head t fn calls
fn commit on the current commit. If it returns
`Again then it waits for the commit to change and tries again. If
switch is provided, then turning off the switch will make the wait return
`Abort at the next opportunity.
val wait_for_path : t -> ?switch:Lwt_switch.t -> Datakit_client.Path.t -> ( [ `File of Cstruct.t | `Dir of Tree.t | `Link of string | `Exec of Cstruct.t ] option -> [ `Finish of 'a | `Again | `Abort ] result ) -> [ `Abort | `Finish of 'a ] result
wait_for_path is similar to
wait_for_head, but waits for a particular sub-tree to change.
fast_forward t commit changes
t to point to
t's head is an ancestor of
commit (or returns an error if not).
with_transaction t fn is the result of applying
fn to a new transaction on branch
t. If the transaction has not been committed when
fn trans returns, the transaction is aborted (and a warning is logged). Use
Transaction.abort to avoid the warning.