Skip to content

Commit

Permalink
tests: suppress system gitattributes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Mar 15, 2011
1 parent 67e6d81 commit 3c995be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,8 @@ GIT_TEMPLATE_DIR="$GIT_BUILD_DIR"/templates/blt
unset GIT_CONFIG
GIT_CONFIG_NOSYSTEM=1
GIT_CONFIG_NOGLOBAL=1
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL
GIT_ATTR_NOSYSTEM=1
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL GIT_ATTR_NOSYSTEM

. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS

Expand Down

0 comments on commit 3c995be

Please sign in to comment.