diff options
Diffstat (limited to 'git-codereview/branch.go')
| -rw-r--r-- | git-codereview/branch.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/git-codereview/branch.go b/git-codereview/branch.go index 37da5fa..c9b21a0 100644 --- a/git-codereview/branch.go +++ b/git-codereview/branch.go @@ -402,6 +402,10 @@ func LocalBranches() []*Branch { // (git rev-parse --abbrev-ref HEAD returns 'HEAD'). s = current.Name } + // + marks a branch checked out in a worktree. Worktrees in detached + // HEAD mode don't appear in the "git branch" output, so this is always + // a normal name. + s = strings.TrimPrefix(s, "+ ") branches = append(branches, &Branch{Name: s}) } return branches |
