Subject: Re: [PATCH] commit: add --committer option

From: Junio C Hamano <[email-masked]>
Date: Wed, 12 Nov 2025 09:24:28 -0800

ZheNing Hu <[email-masked]> writes:

>> I'm afraid I don't quite follow. If you are amending existing commits to
>> fix them up after you have corrected your configuration then they will
>> have the correct committer automatically when you run "git commit
>> --amend --author=..." to correct the author. If you are committing
>> before you have realized that user.{name,email} are misconfigured then I
>> don't see how "--committer" helps because you have not yet realized
>> anything is wrong.
>>
>
> You're right that after realizing the misconfiguration and correcting the
> repository's user.name and user.email, running `git commit --amend` will
>  fix the committer information, but the author remains unchanged. Users
> then need an additional `git commit --amend --author=...` to fix the author,
> which does work but requires an extra step.

Isn't it more like "You need to run with --author to correct the
authorship by amending the commit *anyway*, but while doing so, the
committer information will automatically be corrected"?  As I said
earlier in a separate message, the author and the committer are not
symmetric, so having "--author" does make sense in the above picture,
while "--committer", as Phillip points out, much less.