Git fork

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 <sunshine@sunshineco.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Eric Sunshine and committed by
Junio C Hamano
fca965a3 abe6bb39

+1 -1
+1 -1
t/lib-pager.sh
··· 3 3 test_expect_success 'determine default pager' ' 4 4 test_might_fail git config --unset core.pager && 5 5 less=$( 6 - unset PAGER GIT_PAGER; 6 + sane_unset PAGER GIT_PAGER && 7 7 git var GIT_PAGER 8 8 ) && 9 9 test -n "$less"