aboutsummaryrefslogtreecommitdiffstats
path: root/revision.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-03-10 08:13:21 +0100
committerJunio C Hamano <gitster@pobox.com>2025-03-10 13:16:18 -0700
commit74d414c9f14a91a3b7bd04972bf3eb9bbe6fd81b (patch)
tree7a267ede2a7630503346248db75be00cfd828f00 /revision.c
parentcsum-file: stop depending on `the_repository` (diff)
downloadgit-74d414c9f14a91a3b7bd04972bf3eb9bbe6fd81b.tar.gz
git-74d414c9f14a91a3b7bd04972bf3eb9bbe6fd81b.zip
object: stop depending on `the_repository`
There are a couple of functions exposed by "object.c" that implicitly depend on `the_repository`. Remove this dependency by injecting the repository via a parameter. Adapt callers accordingly by simply using `the_repository`, except in cases where the subsystem is already free of the repository. In that case, we instead pass the repository provided by the caller's context. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index c4390f0938..b536c4a29a 100644
--- a/revision.c
+++ b/revision.c
@@ -3612,7 +3612,8 @@ static void set_children(struct rev_info *revs)
void reset_revision_walk(void)
{
- clear_object_flags(SEEN | ADDED | SHOWN | TOPO_WALK_EXPLORED | TOPO_WALK_INDEGREE);
+ clear_object_flags(the_repository,
+ SEEN | ADDED | SHOWN | TOPO_WALK_EXPLORED | TOPO_WALK_INDEGREE);
}
static int mark_uninteresting(const struct object_id *oid,