Skip to main content

detect_git_branch

Function detect_git_branch 

Source
pub fn detect_git_branch(dir: &Path) -> Option<String>
Expand description

Best-effort current git branch of dir, for labelling --resume rows. None when dir isn’t a git work tree, git is absent, or HEAD is detached. Kept out of the pure reducer — callers invoke it in the impure startup path and stamp the result onto the conversation.