summaryrefslogtreecommitdiff
path: root/t/t7201-co.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7201-co.sh')
-rwxr-xr-xt/t7201-co.sh17
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