Skip to main content

delete_branch

Function delete_branch 

Source
pub fn delete_branch(
    target: &Utf8Path,
    branch: &str,
    verified_tip: &str,
) -> Deletion
Expand description

Delete one branch whose tip verification authorized, compare-and-swap.

git update-ref -d carries the verified tip, so a ref that moved after verification is refused, never lost. A deleted ref then drops its branch.<name> configuration section — what git branch -d would have removed beside it — so a later branch under the reused name inherits nothing stale.