diff options
author | Jeff King <peff@peff.net> | 2020-07-28 20:37:20 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-30 19:18:06 -0700 |
commit | d70a9eb611a9d242c1d26847d223b8677609305b (patch) | |
tree | 2c7f218e0037607dfbf8c92ef34a5d412ceac78c /sequencer.c | |
parent | strvec: drop argv_array compatibility layer (diff) | |
download | tgif-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 'sequencer.c')
-rw-r--r-- | sequencer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c index 31a2b1ab55..cc3f8fa88e 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2761,7 +2761,7 @@ static int reset_merge(const struct object_id *oid) if (!is_null_oid(oid)) strvec_push(&argv, oid_to_hex(oid)); - ret = run_command_v_opt(argv.argv, RUN_GIT_CMD); + ret = run_command_v_opt(argv.v, RUN_GIT_CMD); strvec_clear(&argv); return ret; @@ -3135,7 +3135,7 @@ static int do_exec(struct repository *r, const char *command_line) strvec_pushf(&child_env, "GIT_WORK_TREE=%s", absolute_path(get_git_work_tree())); status = run_command_v_opt_cd_env(child_argv, RUN_USING_SHELL, NULL, - child_env.argv); + child_env.v); /* force re-reading of the cache */ if (discard_index(r->index) < 0 || repo_read_index(r) < 0) |