[PATCH 1/3] test-lib.sh: unset XDG_CONFIG_HOME
- From
Jeff King <peff@peff.net>
- Date
- Jul 24, 2012, 11:53 UTC
- Message-ID
- <20120724115305.GA7328@sigill.intra.peff.net>
Now that git respects XDG_CONFIG_HOME for some lookups, we must be sure to cleanse the test environment. Otherwise, the user's XDG_CONFIG_HOME could influence the test results.
Signed-off-by: Jeff King <peff@peff.net> --- [oops, re-sending because I forgot to cc git@vger]
You can test this trivially with:
XDG_CONFIG_HOME=/whatever ./t1306-xdg-files.sh
t/test-lib.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/t/test-lib.sh b/t/test-lib.sh index acda33d..5e7f435 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -61,6 +61,7 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $(perl -e ' my @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env); print join("\n", @vars); ') +unset XDG_CONFIG_HOME GIT_AUTHOR_EMAIL=author@example.com GIT_AUTHOR_NAME='A U Thor' GIT_COMMITTER_EMAIL=committer@example.com
-- 1.7.11.3.4.g9f70dbb