From: Junio C Hamano Date: Fri, 11 Mar 2011 03:09:31 GMT Subject: Re: [PATCH] find_unique_abbrev(): honor caller-supplied "len" better Message-ID: <7vei6e1hg4.fsf@alter.siamese.dyndns.org> In-Reply-To: Linus Torvalds 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.