summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJohn Cai <johncai86@gmail.com>2024-09-13 21:16:17 +0000
committerJunio C Hamano <gitster@pobox.com>2024-09-13 14:33:30 -0700
commit836474560b653271a819c4de9fa60cb097df2067 (patch)
tree4d4476fdb1bf1d0a83515f4048042ed2454e5270 /builtin/commit.c
parent49d2434664b5b4cb44460d16578039fcd198c40a (diff)
add: pass in repo variable instead of global the_repository
With the repository variable available in the builtin function as an argument, pass this down into helper functions instead of using the global the_repository. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index fd1cc42c5a..6c79923ee0 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -395,7 +395,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
old_index_env = xstrdup_or_null(getenv(INDEX_ENVIRONMENT));
setenv(INDEX_ENVIRONMENT, the_repository->index_file, 1);
- if (interactive_add(argv, prefix, patch_interactive) != 0)
+ if (interactive_add(the_repository, argv, prefix, patch_interactive) != 0)
die(_("interactive add failed"));
the_repository->index_file = old_repo_index_file;