You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using git worktrees, the git branch displayed in a prompt when in a linked worktree is incorrect - it displays the current branch from the main worktree.
The text was updated successfully, but these errors were encountered:
In any fix, is it worth using the plumbing commands (instead of parsing the gitdir contents directly) to make sure this is also more future-proof?
bacar
changed the title
Displays wrong git branch with git worktrees
wrong git branch is displayed when using a linked git worktree
Dec 10, 2018
bacar
changed the title
wrong git branch is displayed when using a linked git worktree
Wrong git branch is displayed when using a linked git worktree
Dec 10, 2018
The problem seems to be with this line in local function has_git_file(dir):
return git_dir and dir..'/'..git_dir
This probably works for submodules (which seem to put a relative gitdir: into the .git file), but not for worktrees (which seem to put in an absolute path).
When using git worktrees, the git branch displayed in a prompt when in a linked worktree is incorrect - it displays the current branch from the main worktree.
The text was updated successfully, but these errors were encountered: