Re: [PATCH 02/16] sha1_file: refactor into `find_pack_object_pos`

2013-06-25 Thread Thomas Rast
Vicent Marti writes: > if (use_lookup) { > - int pos = sha1_entry_pos(index, stride, 0, > - lo, hi, p->num_objects, sha1); > - if (pos < 0) > - return 0; > - return nth_packed_object_offset(p, pos);

[PATCH 02/16] sha1_file: refactor into `find_pack_object_pos`

2013-06-24 Thread Vicent Marti
Looking up the offset in the packfile for a given SHA1 involves the following: - Finding the position in the index for the given SHA1 - Accessing the offset cache in the index for the found position There are cases however where we'd like to find the position of a SHA1 in the inde