conditional markdown preprocessing
[gitweb.git] / t / t3430-rebase-merges.sh
index c1ea2ee2973571830dcaa936cc46a2c9fcf5f652..9efcf4808ac92f13272e279fe4d7b660fccf8da3 100755 (executable)
@@ -158,7 +158,6 @@ test_expect_success 'failed `merge -C` writes patch (may be rescheduled, too)' '
        test_path_is_file .git/rebase-merge/patch
 '
 
-SQ="'"
 test_expect_success 'failed `merge <branch>` does not crash' '
        test_when_finished "test_might_fail git rebase --abort" &&
        git checkout conflicting-G &&
@@ -448,4 +447,25 @@ test_expect_success '--continue after resolving conflicts after a merge' '
        test_path_is_missing .git/MERGE_HEAD
 '
 
+test_expect_success '--rebase-merges with strategies' '
+       git checkout -b with-a-strategy F &&
+       test_tick &&
+       git merge -m "Merge conflicting-G" conflicting-G &&
+
+       : first, test with a merge strategy option &&
+       git rebase -ir -Xtheirs G &&
+       echo conflicting-G >expect &&
+       test_cmp expect G.t &&
+
+       : now, try with a merge strategy other than recursive &&
+       git reset --hard @{1} &&
+       write_script git-merge-override <<-\EOF &&
+       echo overridden$1 >>G.t
+       git add G.t
+       EOF
+       PATH="$PWD:$PATH" git rebase -ir -s override -Xxopt G &&
+       test_write_lines G overridden--xopt >expect &&
+       test_cmp expect G.t
+'
+
 test_done