diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-01-10 11:52:54 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-01-10 11:52:54 -0800 |
| commit | 0669bdf4ebc095a2b26654292e1ff38245ccf88a (patch) | |
| tree | e1cbee05b782fabade7aefc3767ffdbf28f75dfd /t/t7201-co.sh | |
| parent | 4b51386bbfc5d26e552c3c4be135e31cd2f64b44 (diff) | |
| parent | 44f14a9d24cd9f04a0a789e58968d52d44d7f332 (diff) | |
| download | git-0669bdf4ebc095a2b26654292e1ff38245ccf88a.tar.xz | |
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/t7201-co.sh')
| -rwxr-xr-x | t/t7201-co.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh index b7ba1c3268..61ad47b0c1 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -658,4 +658,21 @@ test_expect_success 'custom merge driver with checkout -m' ' test_cmp expect arm ' +test_expect_success 'tracking info copied with autoSetupMerge=inherit' ' + git reset --hard main && + # default config does not copy tracking info + git checkout -b foo-no-inherit koala/bear && + test_cmp_config "" --default "" branch.foo-no-inherit.remote && + test_cmp_config "" --default "" branch.foo-no-inherit.merge && + # with autoSetupMerge=inherit, we copy tracking info from koala/bear + test_config branch.autoSetupMerge inherit && + git checkout -b foo koala/bear && + test_cmp_config origin branch.foo.remote && + test_cmp_config refs/heads/koala/bear branch.foo.merge && + # no tracking info to inherit from main + git checkout -b main2 main && + test_cmp_config "" --default "" branch.main2.remote && + test_cmp_config "" --default "" branch.main2.merge +' + test_done |
