* Questions about --ext-diff
@ 2026-08-21 11:13 Anselm Schüler
2026-08-24 18:23 ` Jeff King
0 siblings, 1 reply; 3+ messages in thread
From: Anselm Schüler @ 2026-08-21 11:13 UTC (permalink / raw)
To: git
I’m unsure what the purpose of --ext-diff is. It seems to me that custom
diff filters should just always be executed.
Is --ext-diff a security feature? It seems like it isn’t, since git-diff
will happily execute the diff filter.
Maybe I don’t correctly understand what a diff filter is intended to be
used for. What situation would you want a diff filter to be run by
git-diff, but not by e.g. git-show?
~Anselm Schüler <mail@anselmschueler.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Questions about --ext-diff
2026-08-21 11:13 Questions about --ext-diff Anselm Schüler
@ 2026-08-24 18:23 ` Jeff King
2026-08-24 20:25 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2026-08-24 18:23 UTC (permalink / raw)
To: Anselm Schüler; +Cc: git
On Fri, Aug 21, 2026 at 01:13:13PM +0200, Anselm Schüler wrote:
> I’m unsure what the purpose of --ext-diff is. It seems to me that custom
> diff filters should just always be executed.
>
> Is --ext-diff a security feature? It seems like it isn’t, since git-diff
> will happily execute the diff filter.
>
> Maybe I don’t correctly understand what a diff filter is intended to be used
> for. What situation would you want a diff filter to be run by git-diff, but
> not by e.g. git-show?
The external diff is free to do whatever it likes; it doesn't even have
to generate text output. It could open a gui window, for example. So it
may be surprising if you run git-log and suddenly dozens of windows open
as we walk through history.
For git-show, there's certainly an argument that it ought to use the
same default as git-diff (since we are showing about one commit's worth
of diffs in either case). I suspect nobody really though much about it,
and as git-show is implemented as (roughly) "git log --no-walk" under
the hood, it inherited the defaults to disallow external diffs.
For many cases, I think textconv is a better experience. It is less
flexible (you must be able to transform the binary into something
textual, which is then diffed). But because of that it fits more neatly
into existing commands. I may be biased as the author of textconv,
though. ;)
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Questions about --ext-diff
2026-08-24 18:23 ` Jeff King
@ 2026-08-24 20:25 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2026-08-24 20:25 UTC (permalink / raw)
To: Jeff King; +Cc: Anselm Schüler, git
Jeff King <peff@peff.net> writes:
> For many cases, I think textconv is a better experience. It is less
> flexible (you must be able to transform the binary into something
> textual, which is then diffed). But because of that it fits more neatly
> into existing commands. I may be biased as the author of textconv,
> though. ;)
As the author of ext-diff, I very much agree. The daily maintenance
of the drafts of "What's cooking" report is very much the only thing
that I find a custom --ext-diff program very useful, but I suspect
that even its use can probably be substituted with creative use of
the textconv filter, diff hunk header patterns, and the -W option.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-24 20:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 11:13 Questions about --ext-diff Anselm Schüler
2026-08-24 18:23 ` Jeff King
2026-08-24 20:25 ` Junio C Hamano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.