Skip to main content

reap_worktree_branch

Function reap_worktree_branch 

Source
pub fn reap_worktree_branch(repo: &Path, branch: &str) -> BranchReapOutcome
Expand description

Delete branch from the repo at repo if no commit would become unreachable, i.e. every commit reachable from it is also reachable from another ref or from a worktree’s HEAD.

Asks about reachability, never merged-ness: nothing here consults whether the branch landed, so a squash merge cannot mislead it. Any failure keeps the branch.