[PATCH 03/29] t1300: use sane_unset() to avoid breaking &&-chain
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 26, 2018, 07:29 UTC
- Message-ID
- <20180626073001.6555-4-sunshine@sunshineco.com>
- In-Reply-To
- <20180626073001.6555-1-sunshine@sunshineco.com>
This test intentionally breaks the &&-chain after "unset HOME" since it doesn't know if 'unset' will succeed or fail. However, an upcoming change will teach --chain-lint to detect &&-chain breakage inside subshells, and it will catch this broken &&-chain. Instead, use sane_unset() which can be safely linked into the &&-chain.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> --- t/t1300-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t1300-config.sh b/t/t1300-config.sh index 03c223708e..24706ba412 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -888,7 +888,7 @@ EOF test_expect_success !MINGW 'get --path copes with unset $HOME' ' ( - unset HOME; + sane_unset HOME && test_must_fail git config --get --path path.home \ >result 2>msg && git config --get --path path.normal >>result &&
-- 2.18.0.419.gfe4b301394