Skip to content

Commit 3c995be

Browse files
jrngitster
authored andcommitted
tests: suppress system gitattributes
Set GIT_ATTR_NOSYSTEM in test-lib to make tests more reliable in two ways: - an invalid GIT_ATTR_NOSYSTEM setting should not cause tests to fail with "fatal: bad config value for 'GIT_ATTR_NOSYSTEM'". - /etc/gitattributes should not change the outcome of tests. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Improved-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 67e6d81 commit 3c995be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/test-lib.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,8 @@ GIT_TEMPLATE_DIR="$GIT_BUILD_DIR"/templates/blt
948948
unset GIT_CONFIG
949949
GIT_CONFIG_NOSYSTEM=1
950950
GIT_CONFIG_NOGLOBAL=1
951-
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL
951+
GIT_ATTR_NOSYSTEM=1
952+
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL GIT_ATTR_NOSYSTEM
952953

953954
. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
954955

0 commit comments

Comments
 (0)