we need to pass an offset pointing to the header because
unpack_entry() needs that..

Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
---
 packv4-parse.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/packv4-parse.c b/packv4-parse.c
index 6abd62e..e833cd2 100644
--- a/packv4-parse.c
+++ b/packv4-parse.c
@@ -470,8 +470,7 @@ static int decode_entries(struct packed_git *p, struct 
pack_window **w_curs,
 
                /* is this a canonical tree object? */
                if ((*scp & 0xf) == OBJ_TREE) {
-                       offset = obj_offset + (scp - src);
-                       return copy_canonical_tree_entries(p, offset,
+                       return copy_canonical_tree_entries(p, obj_offset,
                                                           start, count,
                                                           dstp, sizep);
                }
@@ -647,7 +646,7 @@ static int decode_entries(struct packed_git *p, struct 
pack_window **w_curs,
                c->offset = offset;
                c->last_copy_base = copy_objoffset;
        }
-                                               
+
        return 0;
 }
 
-- 
1.8.2.83.gc99314b

--
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