Skip to main content

worktree_branch

Function worktree_branch 

Source
pub fn worktree_branch(path: &Path) -> Option<String>
Expand description

The branch checked out at path, via git rev-parse --abbrev-ref HEAD. None on detached HEAD, a git error, or non-utf8 output. Read before a worktree is removed so its per-branch review threads clean up under the same (project, branch) key the overlay saved them with.