-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
b:gitsigns_head
is not updated after checkout -b
from Neovim's command line
#377
Labels
bug
Something isn't working
Comments
This happens because Solution is to watch a different file. |
lewis6991
added a commit
that referenced
this issue
Sep 24, 2021
Some git command likes `git checkout -b` do no update .git/index. Instead watch the git dir itself to capture all git operations. Renamed config.watch_index -> config.watch_gitdir Fixes #377
1 task
lewis6991
added a commit
that referenced
this issue
Sep 24, 2021
Some git command likes `git checkout -b` do no update .git/index. Instead watch the git dir itself to capture all git operations. Renamed config.watch_index -> config.watch_gitdir Fixes #377
lewis6991
added a commit
that referenced
this issue
Sep 24, 2021
Some git command likes `git checkout -b` do no update .git/index. Instead watch the git dir itself to capture all git operations. Renamed config.watch_index -> config.watch_gitdir Fixes #377
This was referenced Apr 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When branch is checkout with
checkout -b
from Neovim's command line,b:gitsigns_head
does not display the current branch. If checkout is done withcheckout
, everything works as expected.Neovim version
NVIM v0.5.0
Operating system and version
Ubuntu 18.04.2
Steps to reproduce
nvim -nu minimal.lua file.md
:echo b:gitsigns_head
. This should have the name of default branch.:!git checkout -b feature
. This should change branch tofeature
. Check it with!git branch
.:echo g:gitsigns_head
. This stayed the same.NOTE: if instead of one command
:!git checkout -b feature
run two consecutive:!git branch feature
and:!git checkout feature
, everything works as expected (b:gitsigns_head
has valuefeature
).Expected behavior
Value of
b:gistigns_head
always shows the name of current HEAD.Actual behavior
Value of
b:gistigns_head
not always has the name of current HEAD, as it can have the value HEAD beforecheckout -b
.Gitsigns debug messages
No response
Minimal config
The text was updated successfully, but these errors were encountered: