Skip to main content

FOR_EACH_REF_FORMAT

Constant FOR_EACH_REF_FORMAT 

Source
pub const FOR_EACH_REF_FORMAT: &str = "%(refname:short)%09%(objectname)%09%(upstream:short)%09%(upstream:track)%09%(worktreepath)";
Expand description

The --format string the handler passes to git for-each-ref, one tab-separated line per local branch.

%(upstream:track) renders [gone] verbatim in format strings — plumbing, not the localized porcelain of git branch -vv — and %(worktreepath) is non-empty for a branch checked out in any worktree, the main one included.