@matheusbsbs / matheus-bagliano / commits / eede9f42b5
Fork 0

pack-objects: don't include missing preferred base objects

This improves commit 6d6f9cddbe a bit by simply not including missing bases in the list of objects to process at all. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nicolas Pitre committed Sep 2, 2008 at 10:22 UTC eede9f42b52b4001ffe844af061315b766682a69
1 file changed +8
builtin-pack-objects.c
+8
@@ -1725,6 +1725,14 @@ static void prepare_pack(int window, int depth)
1725 if (entry->type < 0)
1726 die("unable to get type of object %s",
1727 sha1_to_hex(entry->idx.sha1));
1728 + } else {
1729 + if (entry->type < 0) {
1730 + /*
1731 + * This object is not found, but we
1732 + * don't have to include it anyway.
1733 + */
1734 + continue;
1735 + }
1736 }
1737
1738 delta_list[n++] = entry;