summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-09-02 10:22:21 -0400
committerJunio C Hamano <gitster@pobox.com>2008-09-02 17:05:54 -0700
commiteede9f42b52b4001ffe844af061315b766682a69 (patch)
treebd00b6a6b61f5ff9452039a2da4639284831676b /builtin-pack-objects.c
parenta8032d12241f2226a6ab98272b12a1d98ca446a5 (diff)
downloadgit-eede9f42b52b4001ffe844af061315b766682a69.tar.gz
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>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c8
1 files changed, 8 insertions, 0 deletions
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;