Skip to content

Commit a18507c

Browse files
john-caigitster
authored andcommitted
archive: remove the_repository global variable
Replace the_repository with the repository argument that gets passed down through the builtin function. Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a464da8 commit a18507c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

builtin/archive.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Copyright (c) 2006 Franck Bui-Huu
33
* Copyright (c) 2006 Rene Scharfe
44
*/
5-
#define USE_THE_REPOSITORY_VARIABLE
65
#include "builtin.h"
76
#include "archive.h"
87
#include "gettext.h"
@@ -79,7 +78,7 @@ static int run_remote_archiver(int argc, const char **argv,
7978
int cmd_archive(int argc,
8079
const char **argv,
8180
const char *prefix,
82-
struct repository *repo UNUSED)
81+
struct repository *repo)
8382
{
8483
const char *exec = "git-upload-archive";
8584
char *output = NULL;
@@ -110,7 +109,7 @@ int cmd_archive(int argc,
110109

111110
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
112111

113-
ret = write_archive(argc, argv, prefix, the_repository, output, 0);
112+
ret = write_archive(argc, argv, prefix, repo, output, 0);
114113

115114
out:
116115
free(output);

0 commit comments

Comments
 (0)