Re: [PATCH] commit: add --committer option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 16, 2025, 01:06 UTC
- Message-ID
- <xmqqfraeeqgw.fsf@gitster.g>
- In-Reply-To
- <CAOLTT8RSN-72gVXDS-zrr=7wW4HU=CL6acyDx_UXnvo4c5MaRA@mail.gmail.com>
ZheNing Hu <adlternative@gmail.com> writes:
Show 11 quoted lines
>> 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. >> > > Well, I admit that perhaps the design philosophy of author/committer is > inconsistent (which has caused too much trouble), but for users, a consistent > parameter interface is easier to understand and use.
I do not think it is about design philosophy at all, though.
The distinction comes from the difference between what "author" and "committer" fields record. The committer records the identity of the person who was at the keyboard when the commit object was created. The author records the identity of the person who wrote the change that the committer is turning into a commit. There is no symmetry between them, hence there is no inconsistency here.
And it also comes from the actual human user behaviour.
Many authors can pass their patches to a smaller number of committers who make them into part of the official project history, so when a commit is made, there is much stronger need to tweak who the author is for the commit than to tweak who the committer is. On the other hand, it is rare (if ever done) for multiple committers to share a single shell terminal session and take turns to make commit, where you would need to be able to say "this invocations of 'git commit' command is done by person X, who is different from the one who made the previous commit in this same shell session".