No symbols in gutter after assume unchanged support added
jamesha003 opened this issue · comments
What is the latest commit SHA in your installed vim-gitgutter?
774add0
What vim/nvim version are you on?
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 20 2022 18:55:37)
After 626541e I get no symbols in my gutters. I have not ever used the assume unchanged git feature and git ls-files -v
shows no files that are marked assumed unchanged. Previously (on d5bae10) it was working perfectly.
Please switch on logging (let g:gitgutter_log=1
), reproduce the problem, and post the log file (gitgutter.log
in gitgutter's installation directory).
Created a new repo, added one text file, modified it. Gutter symbols do not show up on latest.
==== start log session ====
0.000017 function GitGutterCursorHold[1]..CursorHold Autocommands for "*"..function gitgutter#process_buffer[14]..<SNR>58_setup_path[3]..gitgutter#utility#set_repo_path[16]..gitgutter#async#execute[1]:
0.000017 [async] cd /Users/james/Desktop/test-repo && git ls-files -v --error-unmatch --full-name -z -- test.txt
0.007227 CursorHold Autocommands for "*"..function gitgutter#process_buffer[14]..<SNR>58_setup_path[3]..gitgutter#utility#set_repo_path[16]..gitgutter#async#execute[1]:
0.007227 [async] cd /Users/james/Desktop/test-repo && git ls-files -v --error-unmatch --full-name -z -- test.txt
0.013475 function <SNR>59_on_exit_vim[13]..1[10]..gitgutter#process_buffer[23]..script /Users/james/.vim/bundle/vim-gitgutter/autoload/gitgutter/diff.vim[13]..function <SNR>61_git_supports_command_line_config_override[1]..gitgutter#utility#system[1]:
0.013475 git -c foo.bar=baz --version
0.027143 function <SNR>59_on_exit_vim[13]..1[10]..gitgutter#process_buffer[27]:
0.027143 Assume unchanged: /Users/james/Desktop/test-repo/test.txt
0.028171 function <SNR>59_on_exit_vim[13]..1[10]..gitgutter#process_buffer[27]:
0.028171 Assume unchanged: /Users/james/Desktop/test-repo/test.txt
> git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: test.txt
no changes added to commit (use "git add" and/or "git commit -a")
> git ls-files -v
H test.txt
Ah, I predict you have 'ignorecase'
switched on.
Does 57000a7 help?
Nope, I still don't see any symbols w/ 57000a7.
I have core.ignorecase=false
in my gitconfig.
I meant the vim option 'ignorecase'
.
When gitgutter examines the output of git ls-files -v
, which you posted above, it checks whether the first character of the output is lower case (here for async (the default) or here for sync).
In your case the test should look like 'H test.txt'[0] =~ '[a-z]'
. I'm not sure why that's not working for you. Please could you insert some echom
statements to try to find out what's going wrong? Perhaps echom listing
, or echom listing[0]
.
I've just realised =~
is also affected by 'ignorecase'
. Unbelievable!
If :echo &ignorecase
produces 1
in your vim, then 988a6db should fix the problem.
Ahh, yeah I do have the vim ignorecase
option on. 988a6db did fix my issue. Thanks so much for your help!!!
Phew!
Amazing how a simple check for a lower case character can contain two bugs. 🤦♂️