diff options
author | Jeff King <peff@peff.net> | 2012-03-30 03:01:30 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-03-30 09:13:02 -0700 |
commit | e32a4581bcbf1cf43cd5069a0d19df07542d612a (patch) | |
tree | be814ca06dd1b2d522aa754621675f0870d537d7 /t/t9808-git-p4-chdir.sh | |
parent | Git 1.7.9.5 (diff) | |
download | tgif-e32a4581bcbf1cf43cd5069a0d19df07542d612a.tar.xz |
http-backend: respect existing GIT_COMMITTER_* variables
The http-backend program sets default GIT_COMMITTER_NAME and
GIT_COMMITTER_EMAIL variables based on the REMOTE_USER and
REMOTE_ADDR variables provided by the webserver. However, it
unconditionally overwrites any existing GIT_COMMITTER
variables, which may have been customized by site-specific
code in the webserver (or in a script wrapping http-backend).
Let's leave those variables intact if they already exist,
assuming that any such configuration was intentional. There
is a slight chance of a regression if somebody has set
GIT_COMMITTER_* for the entire webserver, not intending it
to leak through http-backend. We could protect against this
by passing the information in alternate variables. However,
it seems unlikely that anyone will care about that
regression, and there is value in the simplicity of using
the common variable names that are used elsewhere in git.
While we're tweaking the environment-handling in
http-backend, let's switch it to use argv_array to handle
the list of variables. That makes the memory management much
simpler.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9808-git-p4-chdir.sh')
0 files changed, 0 insertions, 0 deletions