Skip to content

Commit eede9f4

Browse files
Nicolas Pitregitster
authored andcommitted
pack-objects: don't include missing preferred base objects
This improves commit 6d6f9cd 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>
1 parent a8032d1 commit eede9f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

builtin-pack-objects.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,6 +1725,14 @@ static void prepare_pack(int window, int depth)
17251725
if (entry->type < 0)
17261726
die("unable to get type of object %s",
17271727
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+
}
17281736
}
17291737

17301738
delta_list[n++] = entry;

0 commit comments

Comments
 (0)