* [PATCH] test-lib.sh: unset XDG_CACHE_HOME
@ 2018-02-16 2:46 Genki Sky
2018-02-16 18:35 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: Genki Sky @ 2018-02-16 2:46 UTC (permalink / raw)
To: git; +Cc: sky, Jeff King, Junio C Hamano
git respects XDG_CACHE_HOME for the credential cache. So, we should
unset XDG_CACHE_HOME for the test environment, lest a user's custom one
cause failure in the test.
For example, t/t0301-credential-cache.sh expects a default directory
to be used if it hasn't explicitly set XDG_CACHE_HOME.
Signed-off-by: Genki Sky <sky@genki.is>
---
Notes:
This is the XDG_CACHE_HOME version of 5adf84ebb ("test-lib.sh: unset
XDG_CONFIG_HOME", 2012-07-24).
t/test-lib.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 9af19055b..001ef6b64 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -116,6 +116,7 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $("$PERL_PATH" -e '
my @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env);
print join("\n", @vars);
')
+unset XDG_CACHE_HOME
unset XDG_CONFIG_HOME
unset GITPERLLIB
GIT_AUTHOR_EMAIL=author@example.com
--
2.16.1.195.g373da842b
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] test-lib.sh: unset XDG_CACHE_HOME
2018-02-16 2:46 [PATCH] test-lib.sh: unset XDG_CACHE_HOME Genki Sky
@ 2018-02-16 18:35 ` Jeff King
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2018-02-16 18:35 UTC (permalink / raw)
To: Genki Sky; +Cc: git, Junio C Hamano
On Thu, Feb 15, 2018 at 09:46:04PM -0500, Genki Sky wrote:
> git respects XDG_CACHE_HOME for the credential cache. So, we should
> unset XDG_CACHE_HOME for the test environment, lest a user's custom one
> cause failure in the test.
>
> For example, t/t0301-credential-cache.sh expects a default directory
> to be used if it hasn't explicitly set XDG_CACHE_HOME.
Yep, this makes perfect sense. I can't believe it took almost a year for
somebody to trigger this. I guess most people don't set XDG_CACHE_HOME.
Thanks.
-Peff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-16 18:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-16 2:46 [PATCH] test-lib.sh: unset XDG_CACHE_HOME Genki Sky
2018-02-16 18:35 ` Jeff King
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).