summaryrefslogtreecommitdiff
path: root/t/t2017-checkout-orphan.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2017-checkout-orphan.sh')
-rwxr-xr-xt/t2017-checkout-orphan.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh
index 88d6992a5e..4d689bd377 100755
--- a/t/t2017-checkout-orphan.sh
+++ b/t/t2017-checkout-orphan.sh
@@ -62,8 +62,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^
'