diff options
Diffstat (limited to 't/t2017-checkout-orphan.sh')
-rwxr-xr-x | t/t2017-checkout-orphan.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh index 88d6992a5e..947d1587ac 100755 --- a/t/t2017-checkout-orphan.sh +++ b/t/t2017-checkout-orphan.sh @@ -10,6 +10,7 @@ Main Tests for --orphan functionality.' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh TEST_FILE=foo @@ -62,8 +63,17 @@ test_expect_success '--orphan ignores branch.autosetupmerge' ' git checkout main && git config branch.autosetupmerge always && git checkout --orphan gamma && - test -z "$(git config branch.gamma.merge)" && + test_cmp_config "" --default "" branch.gamma.merge && test refs/heads/gamma = "$(git symbolic-ref HEAD)" && + test_must_fail git rev-parse --verify HEAD^ && + git checkout main && + git config branch.autosetupmerge inherit && + git checkout --orphan eta && + test_cmp_config "" --default "" branch.eta.merge && + test_cmp_config "" --default "" branch.eta.remote && + echo refs/heads/eta >expected && + git symbolic-ref HEAD >actual && + test_cmp expected actual && test_must_fail git rev-parse --verify HEAD^ ' |