Skip to main content

release

Function release 

Source
pub async fn release(
    repo: &Path,
    branch: &str,
    new_run: &str,
    takeover: &Takeover,
) -> Result<Option<Released>>
Expand description

Release the worktree holding branch to new_run, when an earlier attempt at the same task holds it and it is safe. Returns the run whose worktree was released (see Released), or None when nothing needed (or was allowed) to happen.

An Err is a refusal or a failed removal; the message is what the operator reads. Nothing is left half-done: the old run’s record is written before the removal and rolled back if git refuses it.