From: Nicolas Pitre Date: Tue, 2 Sep 2008 14:22:21 +0000 (-0400) Subject: pack-objects: don't include missing preferred base objects X-Git-Tag: v1.6.1-rc1~229^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/eede9f42b52b4001ffe844af061315b766682a69 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 --- 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;