(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: { (SQ <"git rebase preserve merges\n"> <"\n"> <"This test runs git rebase with preserve merges and ensures commits\n"> <"dropped by the --cherry-pick flag have their childrens parents\n"> <"rewritten.\n"> ) } spids: [13] ) ] spids: [13] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <setup>)} { (SQ <"\n"> <"\ttest_commit A file1 &&\n"> <"\ttest_commit B file1 1 &&\n"> <"\ttest_commit C file2 &&\n"> <"\ttest_commit D file1 2 &&\n"> <"\ttest_commit E file3 &&\n"> <"\tgit checkout A &&\n"> <"\ttest_commit F file4 &&\n"> <"\ttest_commit G file1 3 &&\n"> <"\ttest_commit H file5 &&\n"> <"\tgit checkout F &&\n"> <"\ttest_commit I file6\n"> ) } ) (C {(test_expect_success)} {(SQ <"skip same-resolution merges with -p">)} { (SQ <"\n"> <"\tgit checkout H &&\n"> <"\ttest_must_fail git merge E &&\n"> <"\ttest_commit L file1 23 &&\n"> <"\tgit checkout I &&\n"> <"\ttest_commit G2 file1 3 &&\n"> <"\ttest_must_fail git merge E &&\n"> <"\ttest_commit J file1 23 &&\n"> <"\ttest_commit K file7 file7 &&\n"> <"\tgit rebase -i -p L &&\n"> <"\ttest $(git rev-parse HEAD^^) = $(git rev-parse L) &&\n"> <"\ttest \"23\" = \"$(cat file1)\" &&\n"> <"\ttest \"I\" = \"$(cat file6)\" &&\n"> <"\ttest \"file7\" = \"$(cat file7)\"\n"> ) } ) (C {(test_expect_success)} {(SQ <"keep different-resolution merges with -p">)} { (SQ <"\n"> <"\tgit checkout H &&\n"> <"\ttest_must_fail git merge E &&\n"> <"\ttest_commit L2 file1 23 &&\n"> <"\tgit checkout I &&\n"> <"\ttest_commit G3 file1 4 &&\n"> <"\ttest_must_fail git merge E &&\n"> <"\ttest_commit J2 file1 24 &&\n"> <"\ttest_commit K2 file7 file7 &&\n"> <"\ttest_must_fail git rebase -i -p L2 &&\n"> <"\techo 234 > file1 &&\n"> <"\tgit add file1 &&\n"> <"\tgit rebase --continue &&\n"> <"\ttest $(git rev-parse HEAD^^^) = $(git rev-parse L2) &&\n"> <"\ttest \"234\" = \"$(cat file1)\" &&\n"> <"\ttest \"I\" = \"$(cat file6)\" &&\n"> <"\ttest \"file7\" = \"$(cat file7)\"\n"> ) } ) (C {(test_done)}) ] )