Open roblourens opened 1 year ago
This occurs due to the fact that we optimistically move the resource to "Staged Changes" before the git add
command completes in order to make the UI feel more snappy. You can disable the optimistic update of the Source Control view using the git.optimisticUpdate
setting.
Can the the diff view refresh once the index updates?
I don't think that changing the editor (tab, contents) is the ideal solution here.
Why not? It would be refreshing to match reality, which is what I generally expect from an editor.
Let me give it a try and see what the actual user experience is.
I can confirm that setting "git.optimisticUpdate": false
seems to fix the issue.
It's a bit odd to me that this issue doesn't have more upvotes/visibility as the default behavior breaks being able to use the diff view very often (e.g., "Undo Last Commit" could break it).
It also does the same in reverse- if I unstage a file and immediately open it, it will open "indexed" with no changes even though the tree has updated