]> git.ipfire.org Git - thirdparty/git.git/commitdiff
replay: stop using `the_repository`
authorPatrick Steinhardt <ps@pks.im>
Wed, 1 Oct 2025 15:57:29 +0000 (17:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Oct 2025 19:33:29 +0000 (12:33 -0700)
In `create_commit()` we're using `the_repository` even though we already
have a repository passed to use as an argument. Fix this.

Note that we still cannot get rid of `USE_THE_REPOSITORY_VARIABLE`. This
is because we use `DEFAULT_ABBREV and `get_commit_output_encoding()`,
both of which are stored as global variables that can be modified via
the Git configuration.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
replay.c

index e22ce39940666cc20708dad4cd4a41535a4228ac..13d75d8054316616c80e49ed6924bda9b3f7cb2b 100644 (file)
--- a/replay.c
+++ b/replay.c
@@ -62,7 +62,7 @@ static struct commit *create_commit(struct repository *repo,
        obj = parse_object(repo, &ret);
 
 out:
-       repo_unuse_commit_buffer(the_repository, based_on, message);
+       repo_unuse_commit_buffer(repo, based_on, message);
        free_commit_extra_headers(extra);
        free_commit_list(parents);
        strbuf_release(&msg);