diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-09-23 10:35:09 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-23 10:35:09 -0700 |
| commit | b8e318ea58a0502ff99f37032ee8ac536df4e730 (patch) | |
| tree | b93a691c66d28b299794cd97e87d8cd6bf655587 /builtin/upload-archive.c | |
| parent | 0f41fd28f9677c6fb700dbc9643ad7d7f3c78f52 (diff) | |
| parent | 836474560b653271a819c4de9fa60cb097df2067 (diff) | |
| download | git-b8e318ea58a0502ff99f37032ee8ac536df4e730.tar.gz | |
Merge branch 'jc/pass-repo-to-builtins'
The convention to calling into built-in command implementation has
been updated to pass the repository, if known, together with the
prefix value.
* jc/pass-repo-to-builtins:
add: pass in repo variable instead of global the_repository
builtin: remove USE_THE_REPOSITORY for those without the_repository
builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h
builtin: add a repository parameter for builtin functions
Diffstat (limited to 'builtin/upload-archive.c')
| -rw-r--r-- | builtin/upload-archive.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/builtin/upload-archive.c b/builtin/upload-archive.c index 313a8dfa81..9e9343f121 100644 --- a/builtin/upload-archive.c +++ b/builtin/upload-archive.c @@ -1,12 +1,12 @@ /* * Copyright (c) 2006 Franck Bui-Huu */ +#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "archive.h" #include "path.h" #include "pkt-line.h" #include "sideband.h" -#include "repository.h" #include "run-command.h" #include "strvec.h" @@ -18,7 +18,10 @@ static const char deadchild[] = #define MAX_ARGS (64) -int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix) +int cmd_upload_archive_writer(int argc, + const char **argv, + const char *prefix, + struct repository *repo UNUSED) { struct strvec sent_argv = STRVEC_INIT; const char *arg_cmd = "argument "; @@ -80,7 +83,10 @@ static ssize_t process_input(int child_fd, int band) return sz; } -int cmd_upload_archive(int argc, const char **argv, const char *prefix) +int cmd_upload_archive(int argc, +const char **argv, +const char *prefix, +struct repository *repo UNUSED) { struct child_process writer = CHILD_PROCESS_INIT; |
