mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
If a file is subject to a clean/smudge filter, it is impossible to stage
an individual hunk. Therefore if the user tries to stage a hunk, ask
whether they want to stage the entire instead.
Determining whether a clean/smudge filter applies is done with:
git check-attr filter -- path/to/file
– and looking for "unspecified" (not to be) in the output. The result
is cached so that for a file which is not filtered (the common case),
staging multiple hunks only incurs the cost of the external call once.
See #796.