aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/archive.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2024-10-25 14:02:36 -0400
committerTaylor Blau <me@ttaylorr.com>2024-10-25 14:02:36 -0400
commit0ab43ed95c6cf598ba6d02dabaa5959dfd48ecec (patch)
treeeddae602bfd7eba8d4b33450f950fff0900fff61 /builtin/archive.c
parentMerge branch 'pb/clar-build-fix' (diff)
parentarchive: remove the_repository global variable (diff)
downloadgit-0ab43ed95c6cf598ba6d02dabaa5959dfd48ecec.tar.gz
git-0ab43ed95c6cf598ba6d02dabaa5959dfd48ecec.zip
Merge branch 'jc/a-commands-without-the-repo'
Commands that can also work outside Git have learned to take the repository instance "repo" when we know we are in a repository, and NULL when we are not, in a parameter. The uses of the_repository variable in a few of them have been removed using the new calling convention. * jc/a-commands-without-the-repo: archive: remove the_repository global variable annotate: remove usage of the_repository global git: pass in repo to builtin based on setup_git_directory_gently
Diffstat (limited to 'builtin/archive.c')
-rw-r--r--builtin/archive.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/archive.c b/builtin/archive.c
index dc926d1a3d..13ea7308c8 100644
--- a/builtin/archive.c
+++ b/builtin/archive.c
@@ -2,7 +2,6 @@
* Copyright (c) 2006 Franck Bui-Huu
* Copyright (c) 2006 Rene Scharfe
*/
-#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "archive.h"
#include "gettext.h"
@@ -79,7 +78,7 @@ static int run_remote_archiver(int argc, const char **argv,
int cmd_archive(int argc,
const char **argv,
const char *prefix,
- struct repository *repo UNUSED)
+ struct repository *repo)
{
const char *exec = "git-upload-archive";
char *output = NULL;
@@ -110,7 +109,7 @@ int cmd_archive(int argc,
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
- ret = write_archive(argc, argv, prefix, the_repository, output, 0);
+ ret = write_archive(argc, argv, prefix, repo, output, 0);
out:
free(output);