git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Jeff King <peff@peff.net>,
	 Jacob Keller <jacob.e.keller@intel.com>,
	Josh Steadmon <steadmon@google.com>,
	 Git mailing list <git@vger.kernel.org>,
	 Anthony Nguyen <anthony.l.nguyen@intel.com>
Subject: Re: [PATCH] format-patch: add support for mailmap file
Date: Wed, 14 Aug 2024 12:12:32 -0700	[thread overview]
Message-ID: <xmqqjzgiyl3z.fsf@gitster.g> (raw)
In-Reply-To: <CA+P7+xrHDX-=fqJTM7_4cQp5PJz6QKbM78JG5tYtZXJLbiVmDg@mail.gmail.com> (Jacob Keller's message of "Wed, 14 Aug 2024 10:43:39 -0700")

Jacob Keller <jacob.keller@gmail.com> writes:

> On Wed, Aug 14, 2024, 12:26 AM Jeff King <peff@peff.net> wrote:
>> On Tue, Aug 13, 2024 at 05:20:41PM -0700, Jacob Keller wrote:
>> > The internal tree commits are already baked and can't be changed. We can
>> > of course fix the generated patches from these commits manually. It
>> > seemed convenient to get mailmap to do this for us.
>>
>> I think that makes sense, especially if the caller is specifically
>> asking to enable address mapping. I do wonder if the new format.mailmap
>> might be surprising for some callers, though. For example, would a
>> rebase using the "apply" backend quietly rewrite commit authors using
>> the mailmap?
>>
>> -Peff
>
> Ya, I think the config probably doesn't make sense thinking about it.

This depends on what an average user's perception is.  People like I
would know intimately that "format-patch" is just a glorified "log"
with special features, so I wouldn't be surprised if somebody sends
in a bug report saying "git -c log.mailmap=1 format-patch" does not
honor the mailmap.  In other words, people may expect "git log -1 -p
--format=email HEAD" and "git format-patch -1 --stdout HEAD" to be
pretty similar.

> In our case, it may be more useful to have the mailmap not at
> format-patch time but instead at email time...

And probably you want not the regular mailmap but the custom one
meant to be used only by send-email to ignore the recipient.  You'd
still want to see who wrote it back when they were employed with you
in "git log" output, and not having them in your regular mailmap
would be a way to do so.  You can instead choose to use your regular
mailmap to map them to their current address, which is what we seem
to do here in this project, but it would probably be less common in
$Corp settings.  If the mailmap you give to send-email maps these
dead mailboxes to some known pattern (e.g. a fixed string in the
e-mail part, like "A U Thor <invalid@invalid>"), teaching send-email
to recognise them would be trivial.

Thanks.




  reply	other threads:[~2024-08-14 19:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 21:45 [PATCH] format-patch: add support for mailmap file Jacob Keller
2024-08-13 22:45 ` Josh Steadmon
2024-08-14  0:20   ` Jacob Keller
2024-08-14  7:26     ` Jeff King
2024-08-14 17:43       ` Jacob Keller
2024-08-14 19:12         ` Junio C Hamano [this message]
2024-08-14 21:53 ` Junio C Hamano

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=xmqqjzgiyl3z.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jacob.keller@gmail.com \
    --cc=peff@peff.net \
    --cc=steadmon@google.com \
    /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).