list-objects.c: reduce the_repository references
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 10 Nov 2018 05:48:52 +0000 (06:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Nov 2018 05:50:05 +0000 (14:50 +0900)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
list-objects.c
index 0cfd646026a2eeec66f0e301bba2d1adb7cd3d05..cf7f25bed352ac89625d311a1f5bdcd0c7a37878 100644 (file)
@@ -123,7 +123,7 @@ static void process_tree_contents(struct traversal_context *ctx,
                }
 
                if (S_ISDIR(entry.mode)) {
-                       struct tree *t = lookup_tree(the_repository, entry.oid);
+                       struct tree *t = lookup_tree(ctx->revs->repo, entry.oid);
                        t->object.flags |= NOT_USER_GIVEN;
                        process_tree(ctx, t, base, entry.path);
                }
@@ -131,7 +131,7 @@ static void process_tree_contents(struct traversal_context *ctx,
                        process_gitlink(ctx, entry.oid->hash,
                                        base, entry.path);
                else {
-                       struct blob *b = lookup_blob(the_repository, entry.oid);
+                       struct blob *b = lookup_blob(ctx->revs->repo, entry.oid);
                        b->object.flags |= NOT_USER_GIVEN;
                        process_blob(ctx, b, base, entry.path);
                }