diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-01-10 20:52:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-10 20:52:54 +0100 |
commit | 0669bdf4ebc095a2b26654292e1ff38245ccf88a (patch) | |
tree | e1cbee05b782fabade7aefc3767ffdbf28f75dfd /t/t2017-checkout-orphan.sh | |
parent | Merge branch 'ab/usage-die-message' (diff) | |
parent | config: require lowercase for branch.*.autosetupmerge (diff) | |
download | git-0669bdf4ebc095a2b26654292e1ff38245ccf88a.tar.xz git-0669bdf4ebc095a2b26654292e1ff38245ccf88a.zip |
Merge branch 'js/branch-track-inherit'
"git -c branch.autosetupmerge=inherit branch new old" makes "new"
to have the same upstream as the "old" branch, instead of marking
"old" itself as its upstream.
* js/branch-track-inherit:
config: require lowercase for branch.*.autosetupmerge
branch: add flags and config to inherit tracking
branch: accept multiple upstream branches for tracking
Diffstat (limited to 't/t2017-checkout-orphan.sh')
-rwxr-xr-x | t/t2017-checkout-orphan.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh index f3371e2646..947d1587ac 100755 --- a/t/t2017-checkout-orphan.sh +++ b/t/t2017-checkout-orphan.sh @@ -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^ ' |