Junio C Hamano <gitster@pobox.com> wrote:What about calling it "--keep-unreachable" instead? Can't you just say "o = p->item" here? I can't help but think it would be better to store a "struct object*" here instead of the "const unsigned char *sha1". Both are of type pointer but we only need the struct object* when are working with the in_pack_object elements. Per above just pass the "struct object*" into this function and store that into the array, instead of the sha1. Of course you now need to use "o->sha1" to perform the find_pack_entry_one(). Really? It is not possible for two objects to be placed at the same offset within the same packfile and yet have two different SHA-1 values. The final else condition above is just "return 0". ... If you save the "struct object*" into the in_pack_object (instead of the SHA-1) as I described above you can avoid this second lookup_unknown_object() call when we decide that we do need to pack the object. Otherwise I think it looks quite sane. -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Andrew Morton | -mm merge plans for 2.6.23 |
| Rafael J. Wysocki | [Bug #11207] VolanoMark regression with 2.6.27-rc1 |
| Zhang, Yanmin | AIM7 40% regression with 2.6.26-rc1 |
| Con Kolivas | [PATCH][RSDL-mm 0/7] RSDL cpu scheduler for 2.6.21-rc3-mm2 |
git: | |
| Gregory Haskins | [RFC PATCH 03/17] vbus: add connection-client helper infrastructure |
| David Woodhouse | [PATCH 03/30] solos: FPGA and firmware update support. |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
