Add support for being used as diff-filter in git
First of all, I love this software. This is truly great.
What I'd like to suggest is, adding support for being used as diff-filter. This enables the following big benefits:
- It can be used in
git add -p,git restore -p, etc., which is currently impossible.- With a filter feature support,
git config interactive.diffFilter difft-as-filter-or-somethingwill be possible.
- With a filter feature support,
- It can be used in
git show,git log, and many others, by default, without manually specifying--ext-diffevery time.
By nature, the implementation would necessitate parsing the (traditional) diff(1) output, which is quite difficult because the context information is very limited. I guess the possible directions would be: 1. implementing parse source code segments or 2. find some way to get more information from git.
(Looks like there're even no equivalent of git diff -U 1000 for git add -p)
I understand the current status of this project, I want to respect what you want to build yourself, and this suggestion might not interest you. I simply wish that some way to achieve this will be found by some clever folks and so let me submit this issue here.
Source: Wilfred/difftastic