aboutsummaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/add.c2
-rw-r--r--builtin/am.c16
-rw-r--r--builtin/annotate.c2
-rw-r--r--builtin/bisect--helper.c4
-rw-r--r--builtin/clone.c4
-rw-r--r--builtin/commit.c2
-rw-r--r--builtin/describe.c6
-rw-r--r--builtin/difftool.c2
-rw-r--r--builtin/fetch.c6
-rw-r--r--builtin/gc.c24
-rw-r--r--builtin/pack-objects.c2
-rw-r--r--builtin/pull.c16
-rw-r--r--builtin/rebase.c16
-rw-r--r--builtin/receive-pack.c14
-rw-r--r--builtin/remote.c4
-rw-r--r--builtin/replace.c2
-rw-r--r--builtin/show-branch.c8
-rw-r--r--builtin/stash.c8
-rw-r--r--builtin/submodule--helper.c6
-rw-r--r--builtin/upload-archive.c4
-rw-r--r--builtin/worktree.c6
21 files changed, 77 insertions, 77 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 6185dd12a8..ab39a60a0d 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -228,7 +228,7 @@ int run_add_interactive(const char *revision, const char *patch_mode,
/* pass original pathspec, to be re-parsed */
strvec_push(&argv, pathspec->items[i].original);
- status = run_command_v_opt(argv.argv, RUN_GIT_CMD);
+ status = run_command_v_opt(argv.v, RUN_GIT_CMD);
strvec_clear(&argv);
return status;
}
diff --git a/builtin/am.c b/builtin/am.c
index 992ab3ca27..dd4e6c2d9b 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -812,7 +812,7 @@ static int split_mail_stgit_series(struct am_state *state, const char **paths,
strbuf_release(&sb);
free(series_dir_buf);
- ret = split_mail_conv(stgit_patch_to_mail, state, patches.argv, keep_cr);
+ ret = split_mail_conv(stgit_patch_to_mail, state, patches.v, keep_cr);
strvec_clear(&patches);
return ret;
@@ -1002,7 +1002,7 @@ static void am_setup(struct am_state *state, enum patch_format patch_format,
}
write_state_text(state, "scissors", str);
- sq_quote_argv(&sb, state->git_apply_opts.argv);
+ sq_quote_argv(&sb, state->git_apply_opts.v);
write_state_text(state, "apply-opt", sb.buf);
if (state->rebasing)
@@ -1401,9 +1401,9 @@ static int run_apply(const struct am_state *state, const char *index_file)
BUG("init_apply_state() failed");
strvec_push(&apply_opts, "apply");
- strvec_pushv(&apply_opts, state->git_apply_opts.argv);
+ strvec_pushv(&apply_opts, state->git_apply_opts.v);
- opts_left = apply_parse_options(apply_opts.argc, apply_opts.argv,
+ opts_left = apply_parse_options(apply_opts.nr, apply_opts.v,
&apply_state, &force_apply, &options,
NULL);
@@ -1428,7 +1428,7 @@ static int run_apply(const struct am_state *state, const char *index_file)
strvec_push(&apply_paths, am_path(state, "patch"));
- res = apply_all_patches(&apply_state, apply_paths.argc, apply_paths.argv, options);
+ res = apply_all_patches(&apply_state, apply_paths.nr, apply_paths.v, options);
strvec_clear(&apply_paths);
strvec_clear(&apply_opts);
@@ -1455,7 +1455,7 @@ static int build_fake_ancestor(const struct am_state *state, const char *index_f
cp.git_cmd = 1;
strvec_push(&cp.args, "apply");
- strvec_pushv(&cp.args, state->git_apply_opts.argv);
+ strvec_pushv(&cp.args, state->git_apply_opts.v);
strvec_pushf(&cp.args, "--build-fake-ancestor=%s", index_file);
strvec_push(&cp.args, am_path(state, "patch"));
@@ -2376,10 +2376,10 @@ int cmd_am(int argc, const char **argv, const char *prefix)
strvec_push(&paths, mkpath("%s/%s", prefix, argv[i]));
}
- if (state.interactive && !paths.argc)
+ if (state.interactive && !paths.nr)
die(_("interactive mode requires patches on the command line"));
- am_setup(&state, patch_format, paths.argv, keep_cr);
+ am_setup(&state, patch_format, paths.v, keep_cr);
strvec_clear(&paths);
}
diff --git a/builtin/annotate.c b/builtin/annotate.c
index 7b7ecd366d..58ff977a23 100644
--- a/builtin/annotate.c
+++ b/builtin/annotate.c
@@ -18,5 +18,5 @@ int cmd_annotate(int argc, const char **argv, const char *prefix)
strvec_push(&args, argv[i]);
}
- return cmd_blame(args.argc, args.argv, prefix);
+ return cmd_blame(args.nr, args.v, prefix);
}
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index dd52878413..b46de0489e 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -168,7 +168,7 @@ static int bisect_reset(const char *commit)
struct strvec argv = STRVEC_INIT;
strvec_pushl(&argv, "checkout", branch.buf, "--", NULL);
- if (run_command_v_opt(argv.argv, RUN_GIT_CMD)) {
+ if (run_command_v_opt(argv.v, RUN_GIT_CMD)) {
error(_("could not check out original"
" HEAD '%s'. Try 'git bisect"
" reset <commit>'."), branch.buf);
@@ -530,7 +530,7 @@ static int bisect_start(struct bisect_terms *terms, int no_checkout,
strvec_pushl(&argv, "checkout", start_head.buf,
"--", NULL);
- if (run_command_v_opt(argv.argv, RUN_GIT_CMD)) {
+ if (run_command_v_opt(argv.v, RUN_GIT_CMD)) {
res = error(_("checking out '%s' failed."
" Try 'git bisect start "
"<valid-branch>'."),
diff --git a/builtin/clone.c b/builtin/clone.c
index e26bd82dc4..fccc814a54 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -752,7 +752,7 @@ static int git_sparse_checkout_init(const char *repo)
*/
core_apply_sparse_checkout = 1;
- if (run_command_v_opt(argv.argv, RUN_GIT_CMD)) {
+ if (run_command_v_opt(argv.v, RUN_GIT_CMD)) {
error(_("failed to initialize sparse-checkout"));
result = 1;
}
@@ -844,7 +844,7 @@ static int checkout(int submodule_progress)
"--single-branch" :
"--no-single-branch");
- err = run_command_v_opt(args.argv, RUN_GIT_CMD);
+ err = run_command_v_opt(args.v, RUN_GIT_CMD);
strvec_clear(&args);
}
diff --git a/builtin/commit.c b/builtin/commit.c
index c3f4067537..69ac78d5e5 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1008,7 +1008,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
struct strvec env = STRVEC_INIT;
strvec_pushf(&env, "GIT_INDEX_FILE=%s", index_file);
- if (launch_editor(git_path_commit_editmsg(), NULL, env.argv)) {
+ if (launch_editor(git_path_commit_editmsg(), NULL, env.v)) {
fprintf(stderr,
_("Please supply the message using either -m or -F option.\n"));
exit(1);
diff --git a/builtin/describe.c b/builtin/describe.c
index e3cac8002c..7668591d57 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -509,7 +509,7 @@ static void describe_blob(struct object_id oid, struct strbuf *dst)
NULL);
repo_init_revisions(the_repository, &revs, NULL);
- if (setup_revisions(args.argc, args.argv, &revs, NULL) > 1)
+ if (setup_revisions(args.nr, args.v, &revs, NULL) > 1)
BUG("setup_revisions could not handle all args?");
if (prepare_revision_walk(&revs))
@@ -613,7 +613,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
strvec_pushv(&args, argv);
else
strvec_push(&args, "HEAD");
- return cmd_name_rev(args.argc, args.argv, prefix);
+ return cmd_name_rev(args.nr, args.v, prefix);
}
hashmap_init(&names, commit_name_neq, NULL, 0);
@@ -659,7 +659,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
repo_init_revisions(the_repository, &revs, prefix);
strvec_pushv(&args, diff_index_args);
- if (setup_revisions(args.argc, args.argv, &revs, NULL) != 1)
+ if (setup_revisions(args.nr, args.v, &revs, NULL) != 1)
BUG("malformed internal diff-index command line");
result = run_diff_index(&revs, 0);
diff --git a/builtin/difftool.c b/builtin/difftool.c
index 5ac021a1d4..7ac432b881 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -683,7 +683,7 @@ static int run_file_diff(int prompt, const char *prefix,
strvec_push(&args, "diff");
for (i = 0; i < argc; i++)
strvec_push(&args, argv[i]);
- ret = run_command_v_opt_cd_env(args.argv, RUN_GIT_CMD, prefix, env);
+ ret = run_command_v_opt_cd_env(args.v, RUN_GIT_CMD, prefix, env);
exit(ret);
}
diff --git a/builtin/fetch.c b/builtin/fetch.c
index c2e7afeb6a..c49f0e9752 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1354,7 +1354,7 @@ static int do_fetch(struct transport *transport,
if (tags == TAGS_SET || tags == TAGS_DEFAULT) {
must_list_refs = 1;
- if (ref_prefixes.argc)
+ if (ref_prefixes.nr)
strvec_push(&ref_prefixes, "refs/tags/");
}
@@ -1605,7 +1605,7 @@ static int fetch_multiple(struct string_list *list, int max_children)
add_options_to_argv(&argv);
if (max_children != 1 && list->nr != 1) {
- struct parallel_fetch_state state = { argv.argv, list, 0, 0 };
+ struct parallel_fetch_state state = { argv.v, list, 0, 0 };
strvec_push(&argv, "--end-of-options");
result = run_processes_parallel_tr2(max_children,
@@ -1623,7 +1623,7 @@ static int fetch_multiple(struct string_list *list, int max_children)
strvec_push(&argv, name);
if (verbosity >= 0)
printf(_("Fetching %s\n"), name);
- if (run_command_v_opt(argv.argv, RUN_GIT_CMD)) {
+ if (run_command_v_opt(argv.v, RUN_GIT_CMD)) {
error(_("Could not fetch %s"), name);
result = 1;
}
diff --git a/builtin/gc.c b/builtin/gc.c
index 98719800a3..aafa0946f5 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -514,11 +514,11 @@ static void gc_before_repack(void)
if (done++)
return;
- if (pack_refs && run_command_v_opt(pack_refs_cmd.argv, RUN_GIT_CMD))
- die(FAILED_RUN, pack_refs_cmd.argv[0]);
+ if (pack_refs && run_command_v_opt(pack_refs_cmd.v, RUN_GIT_CMD))
+ die(FAILED_RUN, pack_refs_cmd.v[0]);
- if (prune_reflogs && run_command_v_opt(reflog.argv, RUN_GIT_CMD))
- die(FAILED_RUN, reflog.argv[0]);
+ if (prune_reflogs && run_command_v_opt(reflog.v, RUN_GIT_CMD))
+ die(FAILED_RUN, reflog.v[0]);
}
int cmd_gc(int argc, const char **argv, const char *prefix)
@@ -653,8 +653,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
if (!repository_format_precious_objects) {
close_object_store(the_repository->objects);
- if (run_command_v_opt(repack.argv, RUN_GIT_CMD))
- die(FAILED_RUN, repack.argv[0]);
+ if (run_command_v_opt(repack.v, RUN_GIT_CMD))
+ die(FAILED_RUN, repack.v[0]);
if (prune_expire) {
strvec_push(&prune, prune_expire);
@@ -663,19 +663,19 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
if (has_promisor_remote())
strvec_push(&prune,
"--exclude-promisor-objects");
- if (run_command_v_opt(prune.argv, RUN_GIT_CMD))
- die(FAILED_RUN, prune.argv[0]);
+ if (run_command_v_opt(prune.v, RUN_GIT_CMD))
+ die(FAILED_RUN, prune.v[0]);
}
}
if (prune_worktrees_expire) {
strvec_push(&prune_worktrees, prune_worktrees_expire);
- if (run_command_v_opt(prune_worktrees.argv, RUN_GIT_CMD))
- die(FAILED_RUN, prune_worktrees.argv[0]);
+ if (run_command_v_opt(prune_worktrees.v, RUN_GIT_CMD))
+ die(FAILED_RUN, prune_worktrees.v[0]);
}
- if (run_command_v_opt(rerere.argv, RUN_GIT_CMD))
- die(FAILED_RUN, rerere.argv[0]);
+ if (run_command_v_opt(rerere.v, RUN_GIT_CMD))
+ die(FAILED_RUN, rerere.v[0]);
report_garbage = report_pack_garbage;
reprepare_packed_git(the_repository);
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 323f8bce80..f00ae80796 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -3704,7 +3704,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
if (!use_internal_rev_list)
read_object_list_from_stdin();
else {
- get_object_list(rp.argc, rp.argv);
+ get_object_list(rp.nr, rp.v);
strvec_clear(&rp);
}
cleanup_preferred_base();
diff --git a/builtin/pull.c b/builtin/pull.c
index dae8766646..015f6ded0b 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -584,14 +584,14 @@ static int run_fetch(const char *repo, const char **refspecs)
strvec_push(&args, "--no-show-forced-updates");
if (set_upstream)
strvec_push(&args, set_upstream);
- strvec_pushv(&args, opt_fetch.argv);
+ strvec_pushv(&args, opt_fetch.v);
if (repo) {
strvec_push(&args, repo);
strvec_pushv(&args, refspecs);
} else if (*refspecs)
BUG("refspecs without repo?");
- ret = run_command_v_opt(args.argv, RUN_GIT_CMD);
+ ret = run_command_v_opt(args.v, RUN_GIT_CMD);
strvec_clear(&args);
return ret;
}
@@ -691,8 +691,8 @@ static int run_merge(void)
strvec_push(&args, opt_ff);
if (opt_verify_signatures)
strvec_push(&args, opt_verify_signatures);
- strvec_pushv(&args, opt_strategies.argv);
- strvec_pushv(&args, opt_strategy_opts.argv);
+ strvec_pushv(&args, opt_strategies.v);
+ strvec_pushv(&args, opt_strategy_opts.v);
if (opt_gpg_sign)
strvec_push(&args, opt_gpg_sign);
if (opt_autostash == 0)
@@ -703,7 +703,7 @@ static int run_merge(void)
strvec_push(&args, "--allow-unrelated-histories");
strvec_push(&args, "FETCH_HEAD");
- ret = run_command_v_opt(args.argv, RUN_GIT_CMD);
+ ret = run_command_v_opt(args.v, RUN_GIT_CMD);
strvec_clear(&args);
return ret;
}
@@ -882,8 +882,8 @@ static int run_rebase(const struct object_id *curr_head,
strvec_push(&args, "--interactive");
if (opt_diffstat)
strvec_push(&args, opt_diffstat);
- strvec_pushv(&args, opt_strategies.argv);
- strvec_pushv(&args, opt_strategy_opts.argv);
+ strvec_pushv(&args, opt_strategies.v);
+ strvec_pushv(&args, opt_strategy_opts.v);
if (opt_gpg_sign)
strvec_push(&args, opt_gpg_sign);
if (opt_autostash == 0)
@@ -902,7 +902,7 @@ static int run_rebase(const struct object_id *curr_head,
else
strvec_push(&args, oid_to_hex(merge_head));
- ret = run_command_v_opt(args.argv, RUN_GIT_CMD);
+ ret = run_command_v_opt(args.v, RUN_GIT_CMD);
strvec_clear(&args);
return ret;
}
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 35aeb8effc..dadb52fa92 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -351,7 +351,7 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
oid_to_hex(&opts->restrict_revision->object.oid));
ret = sequencer_make_script(the_repository, &todo_list.buf,
- make_script_args.argc, make_script_args.argv,
+ make_script_args.nr, make_script_args.v,
flags);
if (ret)
@@ -900,7 +900,7 @@ static int run_am(struct rebase_options *opts)
return status;
}
- strvec_pushv(&am.args, opts->git_am_opts.argv);
+ strvec_pushv(&am.args, opts->git_am_opts.v);
strvec_push(&am.args, "--rebasing");
strvec_pushf(&am.args, "--resolvemsg=%s", resolvemsg);
strvec_push(&am.args, "--patch-format=mboxrd");
@@ -969,7 +969,7 @@ static int run_specific_rebase(struct rebase_options *opts, enum action action)
add_var(&script_snippet, "revisions", opts->revisions);
add_var(&script_snippet, "restrict_revision", opts->restrict_revision ?
oid_to_hex(&opts->restrict_revision->object.oid) : NULL);
- sq_quote_argv_pretty(&buf, opts->git_am_opts.argv);
+ sq_quote_argv_pretty(&buf, opts->git_am_opts.v);
add_var(&script_snippet, "git_am_opt", buf.buf);
strbuf_release(&buf);
add_var(&script_snippet, "verbose",
@@ -1625,8 +1625,8 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
allow_preemptive_ff = 0;
}
- for (i = 0; i < options.git_am_opts.argc; i++) {
- const char *option = options.git_am_opts.argv[i], *p;
+ for (i = 0; i < options.git_am_opts.nr; i++) {
+ const char *option = options.git_am_opts.v[i], *p;
if (!strcmp(option, "--committer-date-is-author-date") ||
!strcmp(option, "--ignore-date") ||
!strcmp(option, "--whitespace=fix") ||
@@ -1721,10 +1721,10 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
if (isatty(2) && options.flags & REBASE_NO_QUIET)
strbuf_addstr(&options.git_format_patch_opt, " --progress");
- if (options.git_am_opts.argc || options.type == REBASE_APPLY) {
+ if (options.git_am_opts.nr || options.type == REBASE_APPLY) {
/* all am options except -q are compatible only with --apply */
- for (i = options.git_am_opts.argc - 1; i >= 0; i--)
- if (strcmp(options.git_am_opts.argv[i], "-q"))
+ for (i = options.git_am_opts.nr - 1; i >= 0; i--)
+ if (strcmp(options.git_am_opts.v[i], "-q"))
break;
if (i >= 0) {
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 1fc69cf5bc..439f29d6c7 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -950,7 +950,7 @@ static const char *push_to_deploy(unsigned char *sha1,
struct child_process child = CHILD_PROCESS_INIT;
child.argv = update_refresh;
- child.env = env->argv;
+ child.env = env->v;
child.dir = work_tree;
child.no_stdin = 1;
child.stdout_to_stderr = 1;
@@ -961,7 +961,7 @@ static const char *push_to_deploy(unsigned char *sha1,
/* run_command() does not clean up completely; reinitialize */
child_process_init(&child);
child.argv = diff_files;
- child.env = env->argv;
+ child.env = env->v;
child.dir = work_tree;
child.no_stdin = 1;
child.stdout_to_stderr = 1;
@@ -974,7 +974,7 @@ static const char *push_to_deploy(unsigned char *sha1,
child_process_init(&child);
child.argv = diff_index;
- child.env = env->argv;
+ child.env = env->v;
child.no_stdin = 1;
child.no_stdout = 1;
child.stdout_to_stderr = 0;
@@ -985,7 +985,7 @@ static const char *push_to_deploy(unsigned char *sha1,
read_tree[3] = hash_to_hex(sha1);
child_process_init(&child);
child.argv = read_tree;
- child.env = env->argv;
+ child.env = env->v;
child.dir = work_tree;
child.no_stdin = 1;
child.no_stdout = 1;
@@ -1004,7 +1004,7 @@ static const char *push_to_checkout(unsigned char *hash,
const char *work_tree)
{
strvec_pushf(env, "GIT_WORK_TREE=%s", absolute_path(work_tree));
- if (run_hook_le(env->argv, push_to_checkout_hook,
+ if (run_hook_le(env->v, push_to_checkout_hook,
hash_to_hex(hash), NULL))
return "push-to-checkout hook declined";
else
@@ -1205,11 +1205,11 @@ static void run_update_post_hook(struct command *commands)
for (cmd = commands; cmd; cmd = cmd->next) {
if (cmd->error_string || cmd->did_not_exist)
continue;
- if (!proc.args.argc)
+ if (!proc.args.nr)
strvec_push(&proc.args, hook);
strvec_push(&proc.args, cmd->ref_name);
}
- if (!proc.args.argc)
+ if (!proc.args.nr)
return;
proc.no_stdin = 1;
diff --git a/builtin/remote.c b/builtin/remote.c
index a3b33c2c88..c8240e9fcd 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1470,7 +1470,7 @@ static int update(int argc, const char **argv)
for (i = 1; i < argc; 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) {
strvec_pop(&fetch_argv);
@@ -1478,7 +1478,7 @@ static int update(int argc, const char **argv)
}
}
- retval = run_command_v_opt(fetch_argv.argv, RUN_GIT_CMD);
+ retval = run_command_v_opt(fetch_argv.v, RUN_GIT_CMD);
strvec_clear(&fetch_argv);
return retval;
}
diff --git a/builtin/replace.c b/builtin/replace.c
index 7bc5d66ed9..cd48765911 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -513,7 +513,7 @@ static int convert_graft_file(int force)
continue;
strvec_split(&args, buf.buf);
- if (args.argc && create_graft(args.argc, args.argv, force, 1))
+ if (args.nr && create_graft(args.nr, args.v, force, 1))
strbuf_addf(&err, "\n\t%s", buf.buf);
strvec_clear(&args);
}
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 4c918ce90d..7eae5f3801 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -561,7 +561,7 @@ static int git_show_branch_config(const char *var, const char *value, void *cb)
* default_arg is now passed to parse_options(), so we need to
* mimic the real argv a bit better.
*/
- if (!default_args.argc)
+ if (!default_args.nr)
strvec_push(&default_args, "show-branch");
strvec_push(&default_args, value);
return 0;
@@ -684,9 +684,9 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
git_config(git_show_branch_config, NULL);
/* If nothing is specified, try the default first */
- if (ac == 1 && default_args.argc) {
- ac = default_args.argc;
- av = default_args.argv;
+ if (ac == 1 && default_args.nr) {
+ ac = default_args.nr;
+ av = default_args.v;
}
ac = parse_options(ac, av, prefix, builtin_show_branch_options,
diff --git a/builtin/stash.c b/builtin/stash.c
index bfdbafae89..10d87630cd 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -745,7 +745,7 @@ static int show_stash(int argc, const char **argv, const char *prefix)
strvec_push(&revision_args, argv[i]);
}
- ret = get_stash_info(&info, stash_args.argc, stash_args.argv);
+ ret = get_stash_info(&info, stash_args.nr, stash_args.v);
strvec_clear(&stash_args);
if (ret)
return -1;
@@ -754,7 +754,7 @@ static int show_stash(int argc, const char **argv, const char *prefix)
* The config settings are applied only if there are not passed
* any options.
*/
- if (revision_args.argc == 1) {
+ if (revision_args.nr == 1) {
if (show_stat)
rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT;
@@ -767,7 +767,7 @@ static int show_stash(int argc, const char **argv, const char *prefix)
}
}
- argc = setup_revisions(revision_args.argc, revision_args.argv, &rev, NULL);
+ argc = setup_revisions(revision_args.nr, revision_args.v, &rev, NULL);
if (argc > 1) {
free_stash_info(&info);
usage_with_options(git_stash_show_usage, options);
@@ -1611,5 +1611,5 @@ int cmd_stash(int argc, const char **argv, const char *prefix)
/* Assume 'stash push' */
strvec_push(&args, "push");
strvec_pushv(&args, argv);
- return !!push_stash(args.argc, args.argv, prefix, 1);
+ return !!push_stash(args.nr, args.v, prefix, 1);
}
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 665db1ffed..df135abbf1 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -817,9 +817,9 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
repo_init_revisions(the_repository, &rev, NULL);
rev.abbrev = 0;
- diff_files_args.argc = setup_revisions(diff_files_args.argc,
- diff_files_args.argv,
- &rev, NULL);
+ diff_files_args.nr = setup_revisions(diff_files_args.nr,
+ diff_files_args.v,
+ &rev, NULL);
diff_files_result = run_diff_files(&rev, 0);
if (!diff_result_code(&rev.diffopt, diff_files_result)) {
diff --git a/builtin/upload-archive.c b/builtin/upload-archive.c
index f02bb0ea15..24654b4c9b 100644
--- a/builtin/upload-archive.c
+++ b/builtin/upload-archive.c
@@ -36,7 +36,7 @@ int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix)
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))
@@ -45,7 +45,7 @@ int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix)
}
/* 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);
}
diff --git a/builtin/worktree.c b/builtin/worktree.c
index be5d84f0a0..378f332b5d 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -422,7 +422,7 @@ static int add_worktree(const char *path, const char *refname,
strvec_push(&cp.args, "--quiet");
}
- cp.env = child_env.argv;
+ cp.env = child_env.v;
ret = run_command(&cp);
if (ret)
goto done;
@@ -433,7 +433,7 @@ static int add_worktree(const char *path, const char *refname,
strvec_pushl(&cp.args, "reset", "--hard", "--no-recurse-submodules", NULL);
if (opts->quiet)
strvec_push(&cp.args, "--quiet");
- cp.env = child_env.argv;
+ cp.env = child_env.v;
ret = run_command(&cp);
if (ret)
goto done;
@@ -943,7 +943,7 @@ static void check_clean_worktree(struct worktree *wt,
strvec_pushl(&cp.args, "status",
"--porcelain", "--ignore-submodules=none",
NULL);
- cp.env = child_env.argv;
+ cp.env = child_env.v;
cp.git_cmd = 1;
cp.dir = wt->path;
cp.out = -1;