Re: PATCH: Less fragile lookup of gpg key
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 1, 2010, 19:54 UTC
- Message-ID
- <7v7hnn4cun.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4BDC63FB.7060202@grant-olson.net>
Grant Olson <kgo@grant-olson.net> writes:
Show 17 quoted lines
> On 5/1/2010 1:18 PM, Junio C Hamano wrote: >> A Large Angry SCM <gitzilla@gmail.com> writes: >>> >>> Why not fall back to just the email if the full lookup fails? >> >> Thanks; I like that suggestion a lot better. Grant's suggestion does not >> make the lookup "less fragile", but actually makes it less reliable for >> people with the same address with different spellings of name and want to >> choose which one to use per project. >> -- >> To unsubscribe from this list: send the line "unsubscribe git" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > Unless I'm mis-understanding you, the does the opposite of that. It > finds your gpg key based on your git email, ignoring your git name, so > that different spellings of the name between gpg and git become irrelevant.
If I have two keys like these:
Junio C Hamano <gitster@pobox.com>
Junio Hamano <gitster@pobox.com>and I have the latter set in .git/config to use for the project I am working on, your patch picks one at random, making the process less reliable.
AFAIU, ALASCM's suggestion was to first try the current method (which reliably picks what I told git to use by specifying user.name), and only if that fails, i.e. if I do not have neither of the above two keys but only have a key named like e.g.
Git Panda <gitster@pobox.com>
then use only the e-mail as you wanted to, but do so purely as a fallback.
Which I found quite reasonable.