summaryrefslogtreecommitdiff
path: root/t/t3033-merge-toplevel.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3033-merge-toplevel.sh')
-rwxr-xr-xt/t3033-merge-toplevel.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t3033-merge-toplevel.sh b/t/t3033-merge-toplevel.sh
index 46aadc4..d314599 100755
--- a/t/t3033-merge-toplevel.sh
+++ b/t/t3033-merge-toplevel.sh
@@ -19,6 +19,8 @@ test_expect_success setup '
test_commit three &&
git checkout right &&
test_commit four &&
+ git checkout --orphan newroot &&
+ test_commit five &&
git checkout master
'
@@ -133,4 +135,18 @@ test_expect_success 'merge FETCH_HEAD octopus non-fast-forward' '
test_cmp expect actual
'
+# two-project merge
+test_expect_success 'refuse two-project merge by default' '
+ t3033_reset &&
+ git reset --hard four &&
+ test_must_fail git merge five
+'
+
+test_expect_success 'two-project merge with --allow-unrelated-histories' '
+ t3033_reset &&
+ git reset --hard four &&
+ git merge --allow-unrelated-histories five &&
+ git diff --exit-code five
+'
+
test_done