Skip to content

Commit fca965a

Browse files
sunshinecogitster
authored andcommitted
t/lib-pager: use sane_unset() to avoid breaking &&-chain
This test intentionally breaks the &&-chain following `unset` since it doesn't know if `unset` will succeed or fail and doesn't want a local `unset` failure to abort the test overall. We can do better by using sane_unset() which can be linked into the &&-chain as usual. Signed-off-by: Eric Sunshine <[email protected]> Reviewed-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent abe6bb3 commit fca965a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/lib-pager.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
test_expect_success 'determine default pager' '
44
test_might_fail git config --unset core.pager &&
55
less=$(
6-
unset PAGER GIT_PAGER;
6+
sane_unset PAGER GIT_PAGER &&
77
git var GIT_PAGER
88
) &&
99
test -n "$less"

0 commit comments

Comments
 (0)