t: use sane_unset instead of unset
Change several tests to use the sane_unset function introduced in v1.7.3.1-35-g00648ba instead of the built-in unset function. This fixes a failure I was having on t9130-git-svn-authors-file.sh on Solaris, and prevents several other issues from occurring. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Feb 12, 2012 at 01:05 UTC
1f5ad6b1a7538d6d489ba97c46455efc0bc3266e
6 files changed
+10
-10
t/t4150-am.sh
+1
-1
@@ -136,7 +136,7 @@ test_expect_success setup '
136
git format-patch -M --stdout lorem^ >rename-add.patch &&
137
138
# reset time
139
- unset test_tick &&
139
+ sane_unset test_tick &&
140
test_tick
141
'
142
t/t5560-http-backend-noserver.sh
+3
-3
@@ -17,7 +17,7 @@ run_backend() {
17
GET() {
18
REQUEST_METHOD="GET" && export REQUEST_METHOD &&
19
run_backend "/repo.git/$1" &&
20
- unset REQUEST_METHOD &&
20
+ sane_unset REQUEST_METHOD &&
21
if ! grep "Status" act.out >act
22
then
23
printf "Status: 200 OK\r\n" >act
@@ -30,8 +30,8 @@ POST() {
30
REQUEST_METHOD="POST" && export REQUEST_METHOD &&
31
CONTENT_TYPE="application/x-$1-request" && export CONTENT_TYPE &&
32
run_backend "/repo.git/$1" "$2" &&
33
- unset REQUEST_METHOD &&
34
- unset CONTENT_TYPE &&
33
+ sane_unset REQUEST_METHOD &&
34
+ sane_unset CONTENT_TYPE &&
35
if ! grep "Status" act.out >act
36
then
37
printf "Status: 200 OK\r\n" >act
t/t6032-merge-large-rename.sh
+1
-1
@@ -95,7 +95,7 @@ test_expect_success 'setup large simple rename' '
95
'
96
97
test_expect_success 'massive simple rename does not spam added files' '
98
- unset GIT_MERGE_VERBOSITY &&
98
+ sane_unset GIT_MERGE_VERBOSITY &&
99
git merge --no-stat simple-rename | grep -v Removing >output &&
100
test 5 -gt "$(wc -l < output)"
101
'
t/t9130-git-svn-authors-file.sh
+2
-2
@@ -96,8 +96,8 @@ test_expect_success 'fresh clone with svn.authors-file in config' '
96
rm -r "$GIT_DIR" &&
97
test x = x"$(git config svn.authorsfile)" &&
98
test_config="$HOME"/.gitconfig &&
99
- unset GIT_DIR &&
100
- unset GIT_CONFIG &&
99
+ sane_unset GIT_DIR &&
100
+ sane_unset GIT_CONFIG &&
101
git config --global \
102
svn.authorsfile "$HOME"/svn-authors &&
103
test x"$HOME"/svn-authors = x"$(git config svn.authorsfile)" &&
t/t9200-git-cvsexportcommit.sh
+1
-1
@@ -321,7 +321,7 @@ test_expect_success 'use the same checkout for Git and CVS' '
321
322
(mkdir shared &&
323
cd shared &&
324
- unset GIT_DIR &&
324
+ sane_unset GIT_DIR &&
325
cvs co . &&
326
git init &&
327
git add " space" &&
t/t9808-git-p4-chdir.sh
+2
-2
@@ -25,7 +25,7 @@ test_expect_success 'P4CONFIG and absolute dir clone' '
25
test_when_finished cleanup_git &&
26
(
27
P4CONFIG=p4config && export P4CONFIG &&
28
- unset P4PORT P4CLIENT &&
28
+ sane_unset P4PORT P4CLIENT &&
29
"$GITP4" clone --verbose --dest="$git" //depot
30
)
31
'
@@ -37,7 +37,7 @@ test_expect_success 'P4CONFIG and relative dir clone' '
37
test_when_finished cleanup_git &&
38
(
39
P4CONFIG=p4config && export P4CONFIG &&
40
- unset P4PORT P4CLIENT &&
40
+ sane_unset P4PORT P4CLIENT &&
41
"$GITP4" clone --verbose --dest="git" //depot
42
)
43
'