git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Antonin Godard" <antonin.godard@bootlin.com>
Cc: git@vger.kernel.org, "Emma Brooks" <me@pluvano.com>,
	"Patrick Steinhardt" <ps@pks.im>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Daniel Li" <dan@danielyli.com>
Subject: Re: [PATCH RFC] builtin/log: include From in git show --format=email
Date: Tue, 18 Feb 2025 13:45:34 -0800	[thread overview]
Message-ID: <xmqqh64rj5a9.fsf@gitster.g> (raw)
In-Reply-To: <D7UQ9PQOTOLT.26JEMSNOV4WP6@bootlin.com> (Antonin Godard's message of "Mon, 17 Feb 2025 13:42:47 +0100")

"Antonin Godard" <antonin.godard@bootlin.com> writes:

> This is what the documentation seems to imply, but builtin/log.c uses these
> configuration variables in git_log_config(), for example. In the same file,
> cmd_show() uses git_log_config().

"imply"?  The documentation says so because the command was designed
to work like so when the feature was added in mid 2022.

    34bc1b10 (format-patch: allow forcing the use of in-body From: header, 2022-08-29)
    d5fc07df (format-patch: learn format.forceInBodyFrom configuration variable, 2022-08-29)

Please refrain from using words that imply value-judgement from your
analysis and stick to the facts; I'll try to do so in my messages,
too.

As the log family of commands happen to share much of the
implementation, their code paths pass the log-config structure which
is a mixed bag.  It does not necessarily mean all commands in the
family use all the members in the structure.

> With this reasoning in mind, I thought "git show --format=email" should also
> benefit from the format.from and format.forceInBodyFrom variables, to correctly
> display the output.

"correctly"?  

Changing the behaviour retroactively would mean that those who have
been relying on the fact that in-body header configuration meant for
"git format-patch" does not affect "git log" would suddenly start to
see their output differently.  So I'd worry how bad the downside
would be.

Having said all that.

In hindsight, or if we pretend we were in 2005 and starting the
project again from scratch, if we did not have any "format.*"
configuration variables and instead all of these were "log.*", I'd
agree with everything you said in the message I am responding to.
In such a hypothetical world, we may not even have added a separate
"format-patch" command, but used "git log" with an option to spit
out its output into an individual file for every commit.


      reply	other threads:[~2025-02-18 21:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14 16:31 [PATCH RFC] builtin/log: include From in git show --format=email Antonin Godard
2025-02-14 20:35 ` Junio C Hamano
2025-02-17 12:42   ` Antonin Godard
2025-02-18 21:45     ` Junio C Hamano [this message]

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=xmqqh64rj5a9.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=antonin.godard@bootlin.com \
    --cc=avarab@gmail.com \
    --cc=dan@danielyli.com \
    --cc=git@vger.kernel.org \
    --cc=me@pluvano.com \
    --cc=ps@pks.im \
    /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).