Re: [PATCH RFC v2 2/2] builtin/history: abort reword on same message
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 9, 2026, 19:17 UTC
- Message-ID
- <xmqqbjdj1q1s.fsf@gitster.g>
- In-Reply-To
- <CAN5EUNRz9F+njb_O=Q4DzVMec-q+rDf83Ow+MPJE4yLCBq9qww@mail.gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
Show 6 quoted lines
>> > I wonder if we should check that the committer identity is unchanged as >> > well in case anyone is using this to fix commits after committing with >> > the wrong identity. > > I think that if you reword a commit committed by someone else but end > up with no changes I want it to be kept as it was.
That depends on the reason why the feature to "reword" the commit is being used, and the use case Phillip is talking about is a bit different.
A very common mistake a new user makes when starting a repository is to make commits before they realize that they used a wrong identity to create them. They are happy with what they committed, except that they want these commits to be attributed to user.{name,email} they corrected.
Also, people often use multiple identities (e.g., corp vs personal), and when making commits to the project for their employer they do not want to use their personal identity (and vice versa). After making a mistake to create commits under wrong identity, they want to fix these commits.
In such situations, there is no room for leaving the committer name as "someone else". The user wants to get rid of the "someone else"s identity out of these commits.