Nicolas Pitre <nico@xxxxxxx> wrote: > Let's avoid the open coded pack index reference in pack-object and use > nth_packed_object_sha1() instead. This will help encapsulating index > format differences in one place. > > And while at it there is no reason to copy SHA1's over and over while a > direct pointer to it in the index will do just fine. Ack++. ;-) This is a good change. That API has been bothering me for a while. > @@ -96,14 +96,14 @@ static int find_short_packed_object(int len, const unsigned char *match, unsigne > last = mid; > } > if (first < num) { > - unsigned char now[20], next[20]; > - nth_packed_object_sha1(p, first, now); > + const unsigned char *now, *next; > + now = nth_packed_object_sha1(p, first); > if (match_sha(len, match, now)) { Uh, there is some sort of werid whitespace indent damage on that second added line. It doesn't line up with the first added line, or with either of the context lines. -- Shawn. - 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