git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kang-Che Sung <explorer09@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Combined diff format: Show all filenames by default?
Date: Fri, 03 May 2024 07:57:57 -0700	[thread overview]
Message-ID: <xmqqmsp7aqoa.fsf@gitster.g> (raw)
In-Reply-To: <CADDzAfNz3R5yj1SdJYbBe0f8m3Sp-R+X6dRpYoJ8Foj6zijcDA@mail.gmail.com> (Kang-Che Sung's message of "Fri, 3 May 2024 10:06:37 +0800")

Kang-Che Sung <explorer09@gmail.com> 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.


  reply	other threads:[~2024-05-03 14:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03  2:06 Combined diff format: Show all filenames by default? Kang-Che Sung
2024-05-03 14:57 ` Junio C Hamano [this message]
2024-05-03 19:11   ` Kang-Che Sung
2024-05-03 19:42     ` Junio C Hamano
2024-05-03 22:25       ` Kang-Che Sung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqmsp7aqoa.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=explorer09@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).