Skip to content

Commit

Permalink
archive: remove the_repository global variable
Browse files Browse the repository at this point in the history
Replace the_repository with the repository argument that gets passed
down through the builtin function.

Signed-off-by: John Cai <[email protected]>
  • Loading branch information
john-cai committed Sep 30, 2024
1 parent d64955a commit 857291d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions builtin/archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 857291d

Please sign in to comment.