Re: [PATCH] commit: add --committer option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 12, 2025, 17:24 UTC
- Message-ID
- <xmqqqzu3qi43.fsf@gitster.g>
- In-Reply-To
- <CAOLTT8TLEsSAcfUomoActrUSzje5mQNE7EweXh8WtY3sOfzfkg@mail.gmail.com>
ZheNing Hu <adlternative@gmail.com> writes:
Show 14 quoted lines
>> 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.