test-lib.sh: unset XDG_CONFIG_HOME
authorJeff King <peff@peff.net>
Tue, 24 Jul 2012 11:53:05 +0000 (07:53 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Jul 2012 15:59:07 +0000 (08:59 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh

index 9e2b71132ab7bca267be755999211783c9b77f43..2ac95361850b383b5e8c287e01938a051a500472 100644 (file)
@@ -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