Re: [PATCH] git-commit: search author pattern against mailmap
- From
Jeff King <peff@peff.net>
- Date
- Aug 23, 2013, 18:35 UTC
- Message-ID
- <20130823183541.GB30130@sigill.intra.peff.net>
- In-Reply-To
- <xmqqbo4opajg.fsf@gitster.dls.corp.google.com>
On Fri, Aug 23, 2013 at 10:44:03AM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> My initial reaction was "Why should something as important as 'git > commit' should be playing a guessing-game?" ;-) and I am kind of > ashamed to have added 146ea068 (git commit --author=$name: look > $name up in existing commits, 2008-08-26) and then am embarrased to > have completely forgotten about it. I never use the feature myself. > > But for that old and established "--author parameter that does not > use the standard format guesses" feature to be useful, I agree that > it should honor the mailmap. > > I wonder if it would hurt anybody if we made this unconditional, not > even with "--no-mailmap" override? Opinions?
I think it would be OK. You can always override by giving the actual full address you want instead of a partial one. And if somebody is not up to date in the .mailmap file, maybe this would be a good hint that you should take care of that. :)
I paused for a second, thinking that such advice might not be good for people who do not want to make an official change to upstream's .mailmap (e.g., because they do not want to pollute a long-running fork that will need to merge from upstream, or do not want to pollute a topic branch with an unrelated commit). But I forgot that we have mailmap.file, if they want something custom.
So I think anyone for whom the mailmap lookup does not provide the right answer will fall into one of two groups:
1. A one-off, which can be overridden by specifying the address you
do want. 2. Somebody you will be mentioning frequently; bother to set up
a mailmap.file.As an aside, it seems silly that we do not respect $GIT_DIR/mailmap by default, even without a config option. But I doubt that anybody cares too much, if nobody has raised the issue in all of these years.
-Peff