git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] test-lib.sh: unset XDG_CONFIG_HOME
@ 2012-07-24 11:53 Jeff King
  2012-07-24 11:53 ` [PATCH 2/3] attr: make sure we have an xdg path before using it Jeff King
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jeff King @ 2012-07-24 11:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Matthieu Moy, git

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-07-24 13:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-24 11:53 [PATCH 1/3] test-lib.sh: unset XDG_CONFIG_HOME Jeff King
2012-07-24 11:53 ` [PATCH 2/3] attr: make sure we have an xdg path before using it Jeff King
2012-07-24 12:26   ` [PATCH] ignore: " Matthieu Moy
2012-07-24 13:32     ` Jeff King
2012-07-24 11:54 ` [PATCH 3/3] t1306: check that XDG_CONFIG_HOME works Jeff King
2012-07-24 12:06 ` [PATCH 1/3] test-lib.sh: unset XDG_CONFIG_HOME Matthieu Moy
2012-07-24 12:27   ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).