Re: Changing the default for "core.abbrev"?
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Sep 26, 2016, 06:33 UTC
- Message-ID
- <vpq37kntbjj.fsf@anie.imag.fr>
- In-Reply-To
- <xmqq37knwcf4.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 5 quoted lines
> I am not opposed to bump the default to 12 or whatever, but I > suspect any lengthening today may need to be accompanied by a tool > support that finds the set of objects that are reachable from a > commit whose names begin with non-unique abbreviations that appear > in the commit log message.
Something much simpler would be to set core.abbrev at clone time, depending on the size of the project just cloned. So, when cloning a hello-world, we'd keep the 7 but when cloning a big project we'd get a larger value.
This doesn't cover the case of someone growing his own project without cloning, and isn't as clever as actually looking for colision, but it would probably provide a sane default in 99% cases, and wouldn't be worse than hardcoding 7 in the 1% remaining cases.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/