Open wenfangdu opened 2 years ago
Hey Wenfang Du! Thank you for the bug report.
This is very weird. I have two checks in place that should help prevent this exact behavior. Can you describe your setup a bit more?
Operating system: Windows/Linux/OSX/BSD
WSL/WSL2: Yes/No
Remote SSH folder: Yes/No
Remote folder with sync program: Yes/No
vscode version:
output from `git rev-list --all --count`:
@Sertion
Operating system: Windows 10
WSL/WSL2: No
Remote SSH folder: No
Remote folder with sync program: No
VSCode version: v1.57.1
Output from git rev-list --all --count
: 221
I was mainly doing interactive rebasing to squash and amend commits.
@Sertion I'm curious does Git Blame reobtain the commit info right after a commit? Because I just tested, even after a simple commit (e.g. edit one line), the git-blame
info isn't refreshed in place, reopen the editor won't refresh either.
It is very weird that reopening does not refresh the cache as there is code specifically written for that case. I use fs.watch for detecting if a file changes.
Sadly this is sort of the best available.
There is nothing in place for detecting commits right now. I don't know how easy it would be to add.
Would an fs.watch on whatever file .git/HEAD
points to work?
Would an fs.watch on whatever file
.git/HEAD
points to work?
Could work. The thing to look out for in that case is that a "workspace" can have multiple folders and they can have multiple .git-folders.
I might have found a fix for the issues discussed here. It would be very valuable for me if @wenfangdu could test the changes before I release them and see if they solve the issues you have experienced.
@Sertion I'm curious does Git Blame reobtain the commit info right after a commit? Because I just tested, even after a simple commit (e.g. edit one line), the
git-blame
info isn't refreshed in place, reopen the editor won't refresh either.
Strange, can't reproduce it now, even with v8.1.0. I'll report if I encounter it again.
@Sertion Sadly, the pre-release didn't fix this issue, this time I was using VSCode v1.59.1.
Sometimes, after doing a
git rebase
, the git blame info is outdated, reopening the editor won't help, had to reopen the VSCode window to read the latest commit data, is there a way to force Git Blame to use the latest commit data?If there's no way, could you please add an option to do that?