Subject: Re: Combined diff format: Show all filenames by default?

From: Junio C Hamano <[email-masked]>
Date: Fri, 03 May 2024 07:57:57 -0700

Kang-Che Sung <[email-masked]> writes:

> My reason for making it default:
> ...
> As the "combined diff" format is likely to last for a long time, it
> would be good for Git to set a right default for presenting this
> format.

As the format HAS ALREADY lasted for a long time since its
introduction in d8f4790e (diff-tree --cc: denser combined diff
output for a merge commit., 2006-01-24), it is too late to change
the default.

If a scripted use wants to parse out all the pathnames, it can write
the option on the command line just once in the script file and
forget about it.

For interactive use, the standard answer is "you can alias only for
yourself in ~/.git/config", but unfortunately, because the alias
works at the command level (e.g., an alias that allows "git lc" to
work as "git log --cc --combined-all-paths" can be written), an
optional behaviour like --combined-all-paths that is shared across a
family of commands (e.g., "log" and "show" both would benefit) is a
bit awkward to handle.  

I wonder if introducing an "aliases for options" mechanism would
improve the situation.  Take an otherwise unused character sequence,
say, cccc, and when you say "git <cmd> --cccc", pretend as if you
said "git <cmd> --cc --combined-all-paths" from the command line.