]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t2017-checkout-orphan.sh
Merge branch 'gc/branch-recurse-submodules-fix'
[thirdparty/git.git] / t / t2017-checkout-orphan.sh
index f3371e264605626b163b39a240b91717613a0826..947d1587ac8be9a2ab333049a2196c4e211185e6 100755 (executable)
@@ -63,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^
 '