Skip to content

Commit c289c31

Browse files
drafnelgitster
authored andcommitted
t/t7006: ignore return status of shell's unset builtin
The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a variable name which was not previously set. Since the unset is not likely to fail, ignore its return status, but add a semicolon as a clue that the '&&' was deliberately left off. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 6f89384 commit c289c31

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

t/t7006-pager.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ else
4040
fi
4141

4242
test_expect_success 'setup' '
43-
unset GIT_PAGER GIT_PAGER_IN_USE &&
43+
unset GIT_PAGER GIT_PAGER_IN_USE;
4444
test_might_fail git config --unset core.pager &&
4545
4646
PAGER="cat >paginated.out" &&
@@ -159,7 +159,7 @@ test_expect_success 'color when writing to a file intended for a pager' '
159159
'
160160

161161
test_expect_success 'determine default pager' '
162-
unset PAGER GIT_PAGER &&
162+
unset PAGER GIT_PAGER;
163163
test_might_fail git config --unset core.pager ||
164164
cleanup_fail &&
165165
@@ -173,7 +173,7 @@ then
173173
fi
174174

175175
test_expect_success SIMPLEPAGER 'default pager is used by default' '
176-
unset PAGER GIT_PAGER &&
176+
unset PAGER GIT_PAGER;
177177
test_might_fail git config --unset core.pager &&
178178
rm -f default_pager_used ||
179179
cleanup_fail &&
@@ -192,7 +192,7 @@ test_expect_success SIMPLEPAGER 'default pager is used by default' '
192192
'
193193

194194
test_expect_success TTY 'PAGER overrides default pager' '
195-
unset GIT_PAGER &&
195+
unset GIT_PAGER;
196196
test_might_fail git config --unset core.pager &&
197197
rm -f PAGER_used ||
198198
cleanup_fail &&
@@ -204,7 +204,7 @@ test_expect_success TTY 'PAGER overrides default pager' '
204204
'
205205

206206
test_expect_success TTY 'core.pager overrides PAGER' '
207-
unset GIT_PAGER &&
207+
unset GIT_PAGER;
208208
rm -f core.pager_used ||
209209
cleanup_fail &&
210210

0 commit comments

Comments
 (0)