summaryrefslogtreecommitdiff
path: root/builtin/pull.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2020-07-28 20:37:20 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-07-30 19:18:06 -0700
commitd70a9eb611a9d242c1d26847d223b8677609305b (patch)
tree2c7f218e0037607dfbf8c92ef34a5d412ceac78c /builtin/pull.c
parentstrvec: drop argv_array compatibility layer (diff)
downloadtgif-d70a9eb611a9d242c1d26847d223b8677609305b.tar.xz
strvec: rename struct fields
The "argc" and "argv" names made sense when the struct was argv_array, but now they're just confusing. Let's rename them to "nr" (which we use for counts elsewhere) and "v" (which is rather terse, but reads well when combined with typical variable names like "args.v"). Note that we have to update all of the callers immediately. Playing tricks with the preprocessor is hard here, because we wouldn't want to rewrite unrelated tokens. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pull.c')
-rw-r--r--builtin/pull.c16
1 files changed, 8 insertions, 8 deletions
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;
}