Thread (3 messages) flat view 3 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH] pack-objects: don't include missing preferred base objects

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:45:16
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 builtin-pack-objects.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index ba2cf00..e16b7e8 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;
-- 
1.6.0.1.276.g59b81
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help