Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-06-02 12:09:50 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-03 00:31:16 +0300
commit29fda24dd11e90583f3ea9ff2f90ee9acacd7792 (patch)
tree392cb2d6d8bc054c3f6101714dd61ce36a6239ff /http-backend.c
parent07330a41d66a2c9589b585a3a24ecdcf19994f19 (diff)
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 'http-backend.c')
-rw-r--r--http-backend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http-backend.c b/http-backend.c
index 81a7229ece..58b83a9f66 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -476,9 +476,9 @@ static void run_service(const char **argv, int buffer_input)
host = "(none)";
if (!getenv("GIT_COMMITTER_NAME"))
- strvec_pushf(&cld.env_array, "GIT_COMMITTER_NAME=%s", user);
+ strvec_pushf(&cld.env, "GIT_COMMITTER_NAME=%s", user);
if (!getenv("GIT_COMMITTER_EMAIL"))
- strvec_pushf(&cld.env_array,
+ strvec_pushf(&cld.env,
"GIT_COMMITTER_EMAIL=%s@http.%s", user, host);
strvec_pushv(&cld.args, argv);