Sha1 lookup and GIT_USE_LOOKUP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I noticed in find_pack_entry_one the use of the environment variable
GIT_USE_LOOKUP, which does not seem to be used anywhere else in git or
even in the tests.

Obviously, it determines whether or not a simple binary search or the
sha1_entry_pos method (which is apparently some kind of improved
binary search) should be used to retrieve the offset of an object
(given its sha1) in a pack.
Since this environment variable is not set by default, git will always
use a simple binary search, won't it ?

Also, when searching for a sha1 given a sha1 prefix, among packed
objects, find_short_packed_object also does a simple binary search.
Wouldn't it be simpler to just use the sha1_entry_pos method ?

Thanks

--
Marc Pegon
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]