[PATCH 02/17] fixup! packv4-parse.c: add tree offset caching
- From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
- Date
- Sep 21, 2013, 13:57 UTC
- Message-ID
- <1379771883-10278-3-git-send-email-pclouds@gmail.com>
- In-Reply-To
- <1379771883-10278-1-git-send-email-pclouds@gmail.com>
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 <pclouds@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