ref-filter: make remote_ref_atom_parser() use refname_atom_parser_internal()
[gitweb.git] / t / t3400-rebase.sh
index 80e0a951ea3b699dc57530c1749a2e727ec6779d..f5fd15e55994bafc0f0a2c91b0d00455df13d18d 100755 (executable)
@@ -136,8 +136,8 @@ test_expect_success 'setup: recover' '
 test_expect_success 'Show verbose error when HEAD could not be detached' '
        >B &&
        test_must_fail git rebase topic 2>output.err >output.out &&
-       grep "The following untracked working tree files would be overwritten by checkout:" output.err &&
-       grep B output.err
+       test_i18ngrep "The following untracked working tree files would be overwritten by checkout:" output.err &&
+       test_i18ngrep B output.err
 '
 rm -f B
 
@@ -169,6 +169,29 @@ test_expect_success 'default to common base in @{upstream}s reflog if no upstrea
        test_cmp expect actual
 '
 
+test_expect_success 'cherry-picked commits and fork-point work together' '
+       git checkout default-base &&
+       echo Amended >A &&
+       git commit -a --no-edit --amend &&
+       test_commit B B &&
+       test_commit new_B B "New B" &&
+       test_commit C C &&
+       git checkout default &&
+       git reset --hard default-base@{4} &&
+       test_commit D D &&
+       git cherry-pick -2 default-base^ &&
+       test_commit final_B B "Final B" &&
+       git rebase &&
+       echo Amended >expect &&
+       test_cmp A expect &&
+       echo "Final B" >expect &&
+       test_cmp B expect &&
+       echo C >expect &&
+       test_cmp C expect &&
+       echo D >expect &&
+       test_cmp D expect
+'
+
 test_expect_success 'rebase -q is quiet' '
        git checkout -b quiet topic &&
        git rebase -q master >output.out 2>&1 &&