Re: [PATCH] format-patch: add support for mailmap file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 8/13/2024 3:45 PM, Josh Steadmon wrote:
> On 2024.08.13 14:45, Jacob Keller wrote:
>> From: Jacob Keller <jacob.keller@xxxxxxxxx>
>>
>> Git has support for a mailmap file which translates author and committer
>> names and email addresses to canonical values.
>>
>> Git log has log.mailmap, and the associated --mailmap and --use-mailmap
>> options.
>>
>> Teach git format-patch the format.mailmap and --mailmap options so that
>> formatting a patch can also reflect the canonical values from the
>> mailmap file.
>>
>> Reported-by: Anthony Nguyen <anthony.l.nguyen@xxxxxxxxx>
>> Signed-off-by: Jacob Keller <jacob.keller@xxxxxxxxx>
> 
> I am not sure I understand the utility here; using mailmap at log time
> makes sense because these are old, established commits that may have
> outdated contact information. But when writing patches with
> format-patch, presumably these are still somewhat WIP patches. Is it not
> better to just reset the author information before running
> git-format-patch in this case?
> 

I suppose that this is rather an uncommon circumstance.

> If I've misunderstood the use case, please let me know.
> 

I've had a few cases where I was formatting an old commit. The example
in this case was a change made to an internal tree by one author quite
some time ago. In the meantime, that person has left the company, and
his company address is no longer valid. We still typically put the
original author on such a patch in order to give them credit even if
they're no longer on our team when sending the change, as patches are
made by people, not companies :)

If we left the address alone, it would cause a bounce on the mailing
list if it gets included in the cc. In some cases, the upstream project
mailmap already includes a mapping from their old company address to
their current public address.

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 guess this is not very common, and may not be worth the trouble to
maintain in format-patch, I can understand that.

Another alternative we considered was something like a "--no-cc" option
or configuration to prevent including CC for a dead email address when
sending such patches. Given that the original author no longer works for
us, it is not like we expect them to actually respond or maintain the
code, and in all cases the patches have a sign-off from someone else on
the team.

Thanks,
Jake




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux