diff options
Diffstat (limited to 'third_party/git/builtin/upload-archive.c')
-rw-r--r-- | third_party/git/builtin/upload-archive.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/third_party/git/builtin/upload-archive.c b/third_party/git/builtin/upload-archive.c index 018879737aee..24654b4c9bf0 100644 --- a/third_party/git/builtin/upload-archive.c +++ b/third_party/git/builtin/upload-archive.c @@ -7,7 +7,7 @@ #include "pkt-line.h" #include "sideband.h" #include "run-command.h" -#include "argv-array.h" +#include "strvec.h" static const char upload_archive_usage[] = "git upload-archive <repo>"; @@ -19,7 +19,7 @@ static const char deadchild[] = int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix) { - struct argv_array sent_argv = ARGV_ARRAY_INIT; + struct strvec sent_argv = STRVEC_INIT; const char *arg_cmd = "argument "; if (argc != 2 || !strcmp(argv[1], "-h")) @@ -31,21 +31,21 @@ int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix) init_archivers(); /* put received options in sent_argv[] */ - argv_array_push(&sent_argv, "git-upload-archive"); + strvec_push(&sent_argv, "git-upload-archive"); for (;;) { char *buf = packet_read_line(0, NULL); if (!buf) break; /* got a flush */ - if (sent_argv.argc > MAX_ARGS) + if (sent_argv.nr > MAX_ARGS) die("Too many options (>%d)", MAX_ARGS - 1); if (!starts_with(buf, arg_cmd)) die("'argument' token or flush expected"); - argv_array_push(&sent_argv, buf + strlen(arg_cmd)); + strvec_push(&sent_argv, buf + strlen(arg_cmd)); } /* parse all options sent by the client */ - return write_archive(sent_argv.argc, sent_argv.argv, prefix, + return write_archive(sent_argv.nr, sent_argv.v, prefix, the_repository, NULL, 1); } |