summaryrefslogtreecommitdiff
path: root/t/t0001-init.sh
diff options
context:
space:
mode:
authorLibravatar Brandon Casey <drafnel@gmail.com>2011-01-05 18:30:02 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-01-06 12:22:36 -0800
commited40ec551d4517323c6a46aa555b83cc7651ddbc (patch)
tree9293c1162d75832b1ae4a33cdb1ad849654399ac /t/t0001-init.sh
parenttrace.c: ensure NULL is not passed to printf (diff)
downloadtgif-ed40ec551d4517323c6a46aa555b83cc7651ddbc.tar.xz
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 <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0001-init.sh')
-rwxr-xr-xt/t0001-init.sh8
1 files changed, 4 insertions, 4 deletions
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 &&