From ed40ec551d4517323c6a46aa555b83cc7651ddbc Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Wed, 5 Jan 2011 18:30:02 -0600 Subject: t0001,t1510,t3301: use sane_unset which always returns with status 0 On some shells (like /usr/xpg4/bin/sh on Solaris), unset will exit non-zero when passed the name of a variable that has not been set. Use sane_unset instead so that the return value of unset can be ignored while the && linkage of the test script can be preserved. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t0001-init.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 't/t0001-init.sh') diff --git a/t/t0001-init.sh b/t/t0001-init.sh index af8b9c52a9..f684993211 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -35,7 +35,7 @@ test_expect_success 'plain' ' test_expect_success 'plain nested in bare' ' ( - unset GIT_DIR GIT_WORK_TREE && + sane_unset GIT_DIR GIT_WORK_TREE && git init --bare bare-ancestor.git && cd bare-ancestor.git && mkdir plain-nested && @@ -47,7 +47,7 @@ test_expect_success 'plain nested in bare' ' test_expect_success 'plain through aliased command, outside any git repo' ' ( - unset GIT_DIR GIT_WORK_TREE GIT_CONFIG_NOGLOBAL && + sane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG_NOGLOBAL && HOME=$(pwd)/alias-config && export HOME && mkdir alias-config && @@ -65,7 +65,7 @@ test_expect_success 'plain through aliased command, outside any git repo' ' test_expect_failure 'plain nested through aliased command' ' ( - unset GIT_DIR GIT_WORK_TREE && + sane_unset GIT_DIR GIT_WORK_TREE && git init plain-ancestor-aliased && cd plain-ancestor-aliased && echo "[alias] aliasedinit = init" >>.git/config && @@ -78,7 +78,7 @@ test_expect_failure 'plain nested through aliased command' ' test_expect_failure 'plain nested in bare through aliased command' ' ( - unset GIT_DIR GIT_WORK_TREE && + sane_unset GIT_DIR GIT_WORK_TREE && git init --bare bare-ancestor-aliased.git && cd bare-ancestor-aliased.git && echo "[alias] aliasedinit = init" >>config && -- cgit v1.2.3