{"thread":{"id":"47859","subject":"[PATCH] test-lib.sh: unset XDG_CACHE_HOME","startedAt":"2018-02-16T02:46:11Z","lastAt":"2018-02-16T18:35:31Z","messageCount":2,"participants":["Genki Sky","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"339527","messageId":"6f102a37a06940f6feeeb0c8807ac98a850b7a3b.1518748907.git.sky@genki.is","threadId":"47859","inReplyTo":null,"subject":"[PATCH] test-lib.sh: unset XDG_CACHE_HOME","fromName":"Genki Sky","fromEmail":"sky@genki.is","sentAt":"2018-02-16T02:46:04Z","receivedAt":"2018-02-16T02:46:11Z","isPatch":true,"sender":{"key":"sky@genki.is","avatar":null},"body":"git respects XDG_CACHE_HOME for the credential cache. So, we should\nunset XDG_CACHE_HOME for the test environment, lest a user's custom one\ncause failure in the test.\n\nFor example, t/t0301-credential-cache.sh expects a default directory\nto be used if it hasn't explicitly set XDG_CACHE_HOME.\n\nSigned-off-by: Genki Sky <sky@genki.is>\n---\n\nNotes:\n\n  This is the XDG_CACHE_HOME version of 5adf84ebb (\"test-lib.sh: unset\n  XDG_CONFIG_HOME\", 2012-07-24).\n\n t/test-lib.sh | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 9af19055b..001ef6b64 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -116,6 +116,7 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $(\"$PERL_PATH\" -e '\n \tmy @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env);\n \tprint join(\"\\n\", @vars);\n ')\n+unset XDG_CACHE_HOME\n unset XDG_CONFIG_HOME\n unset GITPERLLIB\n GIT_AUTHOR_EMAIL=author@example.com\n--\n2.16.1.195.g373da842b\n\n"},{"id":"339565","messageId":"20180216183523.GA22021@sigill.intra.peff.net","threadId":"47859","inReplyTo":"6f102a37a06940f6feeeb0c8807ac98a850b7a3b.1518748907.git.sky@genki.is","subject":"Re: [PATCH] test-lib.sh: unset XDG_CACHE_HOME","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-02-16T18:35:23Z","receivedAt":"2018-02-16T18:35:31Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Feb 15, 2018 at 09:46:04PM -0500, Genki Sky wrote:\n\n> git respects XDG_CACHE_HOME for the credential cache. So, we should\n> unset XDG_CACHE_HOME for the test environment, lest a user's custom one\n> cause failure in the test.\n> \n> For example, t/t0301-credential-cache.sh expects a default directory\n> to be used if it hasn't explicitly set XDG_CACHE_HOME.\n\nYep, this makes perfect sense. I can't believe it took almost a year for\nsomebody to trigger this. I guess most people don't set XDG_CACHE_HOME.\n\nThanks.\n\n-Peff\n"}]}