TEST CASE:
- open a (unmodified) file in a Git repository
- delete a line (
dd)
:Gwrite (writes the current file to the index)
quickfixsigns will place a -1 sign, although there is no (non-cached) difference.
A second :Gwrite will remove the sign.
The doautocmd code from fugitive is here: https://github.com/tpope/vim-fugitive/blob/master/plugin/fugitive.vim#L2211-L2215