diff options
author | Jeff King <peff@peff.net> | 2020-07-29 02:37:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-31 04:18:06 +0200 |
commit | d70a9eb611a9d242c1d26847d223b8677609305b (patch) | |
tree | 2c7f218e0037607dfbf8c92ef34a5d412ceac78c /builtin/worktree.c | |
parent | strvec: drop argv_array compatibility layer (diff) | |
download | git-d70a9eb611a9d242c1d26847d223b8677609305b.tar.xz git-d70a9eb611a9d242c1d26847d223b8677609305b.zip |
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/worktree.c')
-rw-r--r-- | builtin/worktree.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |