diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-06-02 11:09:50 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-02 23:31:16 +0200 |
commit | 29fda24dd11e90583f3ea9ff2f90ee9acacd7792 (patch) | |
tree | 392cb2d6d8bc054c3f6101714dd61ce36a6239ff /wt-status.c | |
parent | Merge branch 'tl/ls-tree-oid-only' (diff) | |
download | git-29fda24dd11e90583f3ea9ff2f90ee9acacd7792.tar.xz git-29fda24dd11e90583f3ea9ff2f90ee9acacd7792.zip |
run-command API: rename "env_array" to "env"
Start following-up on the rename mentioned in c7c4bdeccf3 (run-command
API: remove "env" member, always use "env_array", 2021-11-25) of
"env_array" to "env".
The "env_array" name was picked in 19a583dc39e (run-command: add
env_array, an optional argv_array for env, 2014-10-19) because "env"
was taken. Let's not forever keep the oddity of "*_array" for this
"struct strvec", but not for its "args" sibling.
This commit is almost entirely made with a coccinelle rule[1]. The
only manual change here is in run-command.h to rename the struct
member itself and to change "env_array" to "env" in the
CHILD_PROCESS_INIT initializer.
The rest of this is all a result of applying [1]:
* make contrib/coccinelle/run_command.cocci.patch
* patch -p1 <contrib/coccinelle/run_command.cocci.patch
* git add -u
1. cat contrib/coccinelle/run_command.pending.cocci
@@
struct child_process E;
@@
- E.env_array
+ E.env
@@
struct child_process *E;
@@
- E->env_array
+ E->env
I've avoided changing any comments and derived variable names here,
that will all be done in the next commit.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c index d33f9272b7..62fadc0c93 100644 --- a/wt-status.c +++ b/wt-status.c @@ -982,7 +982,7 @@ static void wt_longstatus_print_submodule_summary(struct wt_status *s, int uncom struct strbuf summary = STRBUF_INIT; char *summary_content; - strvec_pushf(&sm_summary.env_array, "GIT_INDEX_FILE=%s", s->index_file); + strvec_pushf(&sm_summary.env, "GIT_INDEX_FILE=%s", s->index_file); strvec_push(&sm_summary.args, "submodule"); strvec_push(&sm_summary.args, "summary"); |