summaryrefslogtreecommitdiff
path: root/builtin/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/remote.c')
-rw-r--r--builtin/remote.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index e8377994e5..c8240e9fcd 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -10,7 +10,7 @@
#include "refs.h"
#include "refspec.h"
#include "object-store.h"
-#include "argv-array.h"
+#include "strvec.h"
#include "commit-reach.h"
static const char * const builtin_remote_usage[] = {
@@ -1451,35 +1451,35 @@ static int update(int argc, const char **argv)
N_("prune remotes after fetching")),
OPT_END()
};
- struct argv_array fetch_argv = ARGV_ARRAY_INIT;
+ struct strvec fetch_argv = STRVEC_INIT;
int default_defined = 0;
int retval;
argc = parse_options(argc, argv, NULL, options, builtin_remote_update_usage,
PARSE_OPT_KEEP_ARGV0);
- argv_array_push(&fetch_argv, "fetch");
+ strvec_push(&fetch_argv, "fetch");
if (prune != -1)
- argv_array_push(&fetch_argv, prune ? "--prune" : "--no-prune");
+ strvec_push(&fetch_argv, prune ? "--prune" : "--no-prune");
if (verbose)
- argv_array_push(&fetch_argv, "-v");
- argv_array_push(&fetch_argv, "--multiple");
+ strvec_push(&fetch_argv, "-v");
+ strvec_push(&fetch_argv, "--multiple");
if (argc < 2)
- argv_array_push(&fetch_argv, "default");
+ strvec_push(&fetch_argv, "default");
for (i = 1; i < argc; i++)
- argv_array_push(&fetch_argv, argv[i]);
+ strvec_push(&fetch_argv, argv[i]);
- if (strcmp(fetch_argv.argv[fetch_argv.argc-1], "default") == 0) {
+ if (strcmp(fetch_argv.v[fetch_argv.nr-1], "default") == 0) {
git_config(get_remote_default, &default_defined);
if (!default_defined) {
- argv_array_pop(&fetch_argv);
- argv_array_push(&fetch_argv, "--all");
+ strvec_pop(&fetch_argv);
+ strvec_push(&fetch_argv, "--all");
}
}
- retval = run_command_v_opt(fetch_argv.argv, RUN_GIT_CMD);
- argv_array_clear(&fetch_argv);
+ retval = run_command_v_opt(fetch_argv.v, RUN_GIT_CMD);
+ strvec_clear(&fetch_argv);
return retval;
}