From ddacfc7466707cbe462594052261647b43868825 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 15 Aug 2025 07:49:51 +0200 Subject: commit-graph: stop using `the_repository` There's still a bunch of uses of `the_repository` in "commit-graph.c", which we want to stop using due to it being a global variable. Refactor the code to stop using `the_repository` in favor of the repository provided via the calling context. This allows us to drop the `USE_THE_REPOSITORY_VARIABLE` macro. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- builtin/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/commit.c') diff --git a/builtin/commit.c b/builtin/commit.c index b5b9608813..8a5dee384d 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1947,7 +1947,7 @@ int cmd_commit(int argc, "new index file. Check that disk is not full and quota is\n" "not exceeded, and then \"git restore --staged :/\" to recover.")); - git_test_write_commit_graph_or_die(); + git_test_write_commit_graph_or_die(the_repository->objects->sources); repo_rerere(the_repository, 0); run_auto_maintenance(quiet); -- cgit v1.2.3