From 29fda24dd11e90583f3ea9ff2f90ee9acacd7792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 2 Jun 2022 11:09:50 +0200 Subject: run-command API: rename "env_array" to "env" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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 Signed-off-by: Junio C Hamano --- trailer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'trailer.c') diff --git a/trailer.c b/trailer.c index 1b12f77d94..52fa47aac6 100644 --- a/trailer.c +++ b/trailer.c @@ -236,7 +236,7 @@ static char *apply_command(struct conf_info *conf, const char *arg) strbuf_replace(&cmd, TRAILER_ARG_STRING, arg); strvec_push(&cp.args, cmd.buf); } - strvec_pushv(&cp.env_array, (const char **)local_repo_env); + strvec_pushv(&cp.env, (const char **)local_repo_env); cp.no_stdin = 1; cp.use_shell = 1; -- cgit v1.2.3