[PATCH] sha1_name: avoid unnecessary sha1 lookup in find_unique_abbrev

2014-11-26 Thread Mike Hommey
An example where this happens is when doing an ls-tree on a tree that contains a commit link. In that case, find_unique_abbrev is called to get a non-abbreviated hex sha1, but still, a lookup is done as to whether the sha1 is in the repository (which ends up looking for a loose object in

Re: [PATCH] sha1_name: avoid unnecessary sha1 lookup in find_unique_abbrev

2014-11-26 Thread Junio C Hamano
Mike Hommey m...@glandium.org writes: An example where this happens is when doing an ls-tree on a tree that contains a commit link. In that case, find_unique_abbrev is called to get a non-abbreviated hex sha1, but still, a lookup is done as to whether the sha1 is in the repository (which ends