Thread (3 messages) flat view 3 messages, 3 authors, 21d ago

Re: Questions about --ext-diff

From: Jeff King <hidden>
Date: 2026-08-24 18:23:04

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help