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.tokkee.org/?a=commitdiff_plain;h=eede9f42b52b4001ffe844af061315b766682a69;p=git.git 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 ba2cf00f5..e16b7e8f0 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;