list-objects.c: reduce the_repository references

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Nguyễn Thái Ngọc Duy 2018-11-10 06:48:52 +01:00 committed by Junio C Hamano
parent 01d40c8487
commit 96ab6e0b30
1 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ static void process_tree_contents(struct traversal_context *ctx,
} }


if (S_ISDIR(entry.mode)) { 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; t->object.flags |= NOT_USER_GIVEN;
process_tree(ctx, t, base, entry.path); 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, process_gitlink(ctx, entry.oid->hash,
base, entry.path); base, entry.path);
else { 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; b->object.flags |= NOT_USER_GIVEN;
process_blob(ctx, b, base, entry.path); process_blob(ctx, b, base, entry.path);
} }