From eede9f42b52b4001ffe844af061315b766682a69 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Tue, 2 Sep 2008 10:22:21 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- builtin-pack-objects.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'builtin-pack-objects.c') diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index ba2cf00f5e..e16b7e8f06 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1725,6 +1725,14 @@ static void prepare_pack(int window, int depth) if (entry->type < 0) die("unable to get type of object %s", sha1_to_hex(entry->idx.sha1)); + } else { + if (entry->type < 0) { + /* + * This object is not found, but we + * don't have to include it anyway. + */ + continue; + } } delta_list[n++] = entry; -- cgit v1.2.3