From: ZheNing Hu Date: Sat, 15 Nov 2025 05:29:18 GMT Subject: Re: [PATCH] commit: add --committer option Message-ID: In-Reply-To: Junio C Hamano 于2025年11月13日周四 01:24写道: > > ZheNing Hu 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. > 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.