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.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t3033-merge-toplevel.sh b/t/t3033-merge-toplevel.sh
index d314599428..e29c284b9b 100755
--- a/t/t3033-merge-toplevel.sh
+++ b/t/t3033-merge-toplevel.sh
@@ -142,6 +142,17 @@ test_expect_success 'refuse two-project merge by default' '
test_must_fail git merge five
'
+test_expect_success 'refuse two-project merge by default, quit before --autostash happens' '
+ t3033_reset &&
+ git reset --hard four &&
+ echo change >>one.t &&
+ git diff >expect &&
+ test_must_fail git merge --autostash five 2>err &&
+ test_i18ngrep ! "stash" err &&
+ git diff >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'two-project merge with --allow-unrelated-histories' '
t3033_reset &&
git reset --hard four &&
@@ -149,4 +160,15 @@ test_expect_success 'two-project merge with --allow-unrelated-histories' '
git diff --exit-code five
'
+test_expect_success 'two-project merge with --allow-unrelated-histories with --autostash' '
+ t3033_reset &&
+ git reset --hard four &&
+ echo change >>one.t &&
+ git diff one.t >expect &&
+ git merge --allow-unrelated-histories --autostash five 2>err &&
+ test_i18ngrep "Applied autostash." err &&
+ git diff one.t >actual &&
+ test_cmp expect actual
+'
+
test_done