[PATCH 1/3] tests: protect against GIT_ATTR_NOGLOBAL from environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The GIT_ATTR_NOGLOBAL environment variable simulates a totally clean
environment with no ~/.gitattributes present.  The intent is to
make test results more easily reproducible, but it currently has
the opposite effect --- if GIT_ATTR_NOGLOBAL is set to 1, t0003.3
(core.attributesfile) fails.

Unset GIT_ATTR_NOGLOBAL in the affected test script.  test-lib already
sets $HOME to protect against pollution from user settings, so this
should be safe.

Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
---
 t/t0003-attributes.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index ebbc755..3cfc824 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -18,6 +18,7 @@ attr_check () {
 
 test_expect_success 'setup' '
 
+	sane_unset GIT_ATTR_NOGLOBAL &&
 	mkdir -p a/b/d a/c &&
 	(
 		echo "[attr]notest !test"
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]