Do not assume the new name (`fnamer`) is the same length as the old
name (`fnamel`).
Also use the new name rather than the old name when populating the
quickfix list.
See #872.
Instead of checking whether this file exists in `diff_base` and
returning early, we let `git show` fail, which still creates an empty
`from_file` for the subsequent `git diff` to use.
This mostly reverts 2ee95686c5, but we
keep the test case.
If g:gitgutter_diff_base has been set and the file being processed does
not exist in that branch/commit, ensure that every line is marked as
added - this is how git-diff behaves.
Fixes#855.
When you look at previous versions of a file, e.g. with Fugitive's
:0Gclog, gitgutter will set the diff base to the current version's
parent so that diff markers appear as expected.
Thannks to @rcreasi for the idea and initial implementation.
This removes the g:gitgutter_sign_column_always option.
Vim 7.4.2201 introduced the |signcolumn| option to configure when the
signcolumn is visible, building in behaviour which the plugin provided
manually.
Although it would be good to maintain this feature for older Vims, the
complexity added by the code outweighs the benefit of backward
compatibility.
Previously gitgutter could only diff the buffer against the index. This
change enables diffing against the working tree, which will be useful
for stashing.
In #303 there was a request to deactivate gitgutter when &diff is set,
although no reason was given initially. Then it was reported that
gitgutter showed signs, in the wrong place, during Fugitive's Gdiff.
However I cannot reproduce signs showing in Gdiff's index buffer. And
the signs in the working tree buffer are correct.
Furthermore the commit which deactivated gitgutter (85f6e136) had the
side-effect of breaking `:redir` and clearing Vim's startup message
(see #500).
Therefore since that change had no benefit, and a couple of drawbacks,
it makes sense to undo it.
Closes#500.