Skip to content

Commit 7976e90

Browse files
Genki Skygitster
authored andcommitted
test-lib.sh: unset XDG_CACHE_HOME
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9752ad0 commit 7976e90

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/test-lib.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $("$PERL_PATH" -e '
104104
my @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env);
105105
print join("\n", @vars);
106106
')
107+
unset XDG_CACHE_HOME
107108
unset XDG_CONFIG_HOME
108109
unset GITPERLLIB
109110

0 commit comments

Comments
 (0)