!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 <pclo...@gmail.com>
 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 
                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))
                base_obj->data = read_sha1_file(d->base.sha1, &type, 
                if (!base_obj->data)

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to