Re: [PATCH] find_unique_abbrev(): honor caller-supplied "len" better
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 11, 2011, 03:09 UTC
- Message-ID
- <7vei6e1hg4.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <AANLkTinHCsyN4TLBAxzxOn_QAK67VkT1pLgcu7XB0JCD@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
> But it is somewhat expensive to calculate "max current uniqueness", so > I would suggest ditching the whole notion of "how many extra numbers > do I need for futureproofing", and go for just setting the absolute > value of DEFAULT_ABBREV.
Thanks; apparently our mails crossed...
I suspect that in a sane repository with set of reasonably packed objects, we can cheaply get a rough estimate of the number of objects to about an order of magnitude (e.g. "likely to have 10k to 100k objects"), and we might able to come up with a way to automatically raise the default length.