Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stage entire file if clean/smudge filter applies
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 airblade#796.
- Loading branch information