-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for being used as diff-filter in git #280
Comments
Maybe we can make a pager which calls |
Interesting, I didn't know about this git setting. Here's the docs: https://git-scm.com/docs/git-config#Documentation/git-config.txt-interactivediffFilter
FWIW you can do this today, by setting diff.external: https://difftastic.wilfred.me.uk/git.html
I think this is a cool idea, but it'd require some work:
This is definitely something I'd be interested in adding, assuming we can get the original file content out of git. It's low on my list right now though, as there are still cases where difftastic gives bad diff results. |
Glad to hear that.
IIUC that is true with One (poorman's) hack I came up with is overwriting git and make it give additional information to difftastic. e.g. Put something like this in your shrc: function git() {
DIFFTASTIC_GIT_COMMAND=$@ command git "$@"
} difftastic can provide help through a shell script file like /usr/local/share/difftastic/git-interactive-support.sh, or |
If you are referring to the style of delta, I've got a pull request open #286. |
OH, we are talking about a different thing.
|
Does |
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:
git add -p
,git restore -p
, etc., which is currently impossible.git config interactive.diffFilter difft-as-filter-or-something
will be possible.git show
,git log
, and many others, by default, without manually specifying--ext-diff
every 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
forgit 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.
The text was updated successfully, but these errors were encountered: