Thread (24 messages) flat view 24 messages, 3 authors, 2016-06-15
STALE3737d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v1 current

[PATCH 05/17] fixup! index-pack: support completing thin packs v4

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:58:51
Subsystem: the rest · Maintainer: Linus Torvalds

!is_delta_tree() is not correct because the tree may have been
resolved in by find_unresolved_deltas() in the previous iteration of
this loop. Check for entry->idx.sha1 instead, that must be non-null
when we resolve the object.

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 builtin/index-pack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index fbf97f0..db885b1 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1783,7 +1783,7 @@ static void fix_unresolved_deltas(struct sha1file *f, int nr_unresolved)
 		enum object_type type;
 		struct base_data *base_obj = alloc_base_data();
 
-		if (obj->real_type != OBJ_REF_DELTA && !is_delta_tree(obj))
+		if (!is_null_sha1(obj->idx.sha1))
 			continue;
 		base_obj->data = read_sha1_file(d->base.sha1, &type, &base_obj->size);
 		if (!base_obj->data)
-- 
1.8.2.83.gc99314b
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help