]> git.ipfire.org Git - thirdparty/git.git/commit
archive: remove the_repository global variable
authorJohn Cai <johncai86@gmail.com>
Thu, 10 Oct 2024 21:13:48 +0000 (21:13 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 11 Oct 2024 16:37:18 +0000 (09:37 -0700)
commit528d3e4d53dd24b9efad3213736f1d6212c80454
tree2ec6245da701cb2b5446a7d992b64eac127d0e83
parentebe8f4b6ecac3efe5d059163518f0594ad0317d0
archive: remove the_repository global variable

As part of the effort to get rid of global state due to the global
the_repository variable, replace the_repository with the repository
argument that gets passed down through the builtin function.

The repo might be NULL, but we should be safe in write_archive() because
it detects if we are outside of a repository and calls
setup_git_directory() which will error.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/archive.c