git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t/lib-httpd: pass through GIT_CONFIG_NOSYSTEM env

From
Jeff King <peff@peff.net>
Date
Mar 16, 2016, 00:56 UTC
Message-ID
<20160316005651.GA29541@sigill.intra.peff.net>

We set GIT_CONFIG_NOSYSTEM in our test scripts so that we do not accidentally read /etc/gitconfig and have it influence the outcome of the tests. But when running smart-http tests, Apache will clean the environment, including this variable, and the "server" side of our http operations will read it.

You can see this breakage by doing something like:
  make
  ./git config --system http.getanyfile false
  make test

which will cause t5561 to fail when it tests the fallback-to-dumb operation.

We can fix this by instructing Apache to pass through the variable. Unlike with other variables (e.g., 89c57ab3's GIT_TRACE), we don't need to set a dummy value to prevent warnings from Apache. test-lib.sh already makes sure that GIT_CONFIG_NOSYSTEM is set and exported.

Signed-off-by: Jeff King <peff@peff.net>
---
Obviously trivial enough for "maint", but not at all urgent; it has
been this way for ages. I only noticed because I happened to recently
munge my system config to replicate a particular server config which
disables http.getanyfile.
 t/lib-httpd/apache.conf | 1 +
 1 file changed, 1 insertion(+)
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index f667e7c..9317ba0 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -74,6 +74,7 @@ PassEnv GIT_VALGRIND_OPTIONS
 PassEnv GNUPGHOME
 PassEnv ASAN_OPTIONS
 PassEnv GIT_TRACE
+PassEnv GIT_CONFIG_NOSYSTEM
 
 Alias /dumb/ www/
 Alias /auth/dumb/ www/auth/dumb/
-- 
2.8.0.rc2.331.ga574393
Message 1 of 1 in “t/lib-httpd: pass through GIT_CONFIG_NOSYSTEM env”
  1. t/lib-httpd: pass through GIT_CONFIG_NOSYSTEM envJeff King, Mar 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.