From: Junio C Hamano Date: Thu, 31 Jan 2008 10:21:49 GMT Subject: Re: git-push: forced update of tag shows unabbreviated SHA1 Message-ID: <7vodb2cn2a.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080131100625.GB25546@coredump.intra.peff.net> Jeff King writes: > ... then for every 12345678* that we don't have, we will claim > the correct abbreviation is 1234568. > > In practice, I doubt this is a problem. > > But getting back to your point: yes, I agree it is a little ugly. > Rewriting find_unique_abbrev would be necessary for fixing it, and I'm > not sure it is worth the trouble. I think that needs to be done carefully. I recall some callers do expect it to return NULL for nonexistant objects, so the bug you noted above as "rare case" may need to be fixed, which I think is more important than coming up with a potentially too short abbreviation.