(List (= scope= flags=0 words=[] bindings=[('test_description', {[SQ ]})]) (Com {[LIT_CHARS .]} {[LIT_CHARS ./test-lib.sh]}) (Com {[LIT_CHARS .]} {[DQ [VarSub TEST_DIRECTORY]] [LIT_CHARS /lib-rebase.sh]}) (FunctionDef test_revision_subjects [] (List (= scope= flags=0 words=[] bindings=[('expected', {[DQ [VarSub 1]]})]) (Com {[LIT_CHARS shift]}) (Com {[LIT_CHARS set]} {[LIT_CHARS --]} {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS log]} {[LIT_CHARS --format] [LIT_OTHER "="] [LIT_OTHER "%"] [LIT_CHARS s]} {[LIT_CHARS --no-walk] [LIT_OTHER "="] [LIT_CHARS unsorted]} {[DQ [VarSub @]]})]}) (Com {[LIT_CHARS test]} {[DQ [VarSub expected]]} {[LIT_OTHER "="]} {[DQ [VarSub *]]}) ) ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (FunctionDef test_run_rebase [] (List (= scope= flags=0 words=[] bindings=[('result', {[VarSub 1]})]) (Com {[LIT_CHARS shift]}) (Com {[LIT_CHARS test_expect_] [VarSub result]} {[DQ [LIT_CHARS "rebase "][VarSub *][LIT_CHARS " after merge from upstream"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " e w &&\n"][LIT_CHARS "\t\ttest_cmp_rev e HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'n o' e..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -i]}) (FunctionDef test_run_rebase [] (List (= scope= flags=0 words=[] bindings=[('result', {[VarSub 1]})]) (Com {[LIT_CHARS shift]}) (= scope= flags=0 words=[] bindings=[('expected', {[VarSub 1]})]) (Com {[LIT_CHARS shift]}) (Com {[LIT_CHARS test_expect_] [VarSub result]} {[DQ [LIT_CHARS "rebase "][VarSub *][LIT_CHARS " of non-linear history is linearized in place"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " d w &&\n"][LIT_CHARS "\t\ttest_cmp_rev d HEAD~3 &&\n"][LIT_CHARS "\t\ttest_linear_range "]] [\ LIT_ESCAPED_CHAR "\\'"] [DQ [VarSub expected]] [\ LIT_ESCAPED_CHAR "\\'"] [DQ [LIT_CHARS " d..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]} {[LIT_CHARS -i]}) (FunctionDef test_run_rebase [] (List (= scope= flags=0 words=[] bindings=[('result', {[VarSub 1]})]) (Com {[LIT_CHARS shift]}) (= scope= flags=0 words=[] bindings=[('expected', {[VarSub 1]})]) (Com {[LIT_CHARS shift]}) (Com {[LIT_CHARS test_expect_] [VarSub result]} {[DQ [LIT_CHARS "rebase "][VarSub *][LIT_CHARS " of non-linear history is linearized upstream"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " c w &&\n"][LIT_CHARS "\t\ttest_cmp_rev c HEAD~4 &&\n"][LIT_CHARS "\t\ttest_linear_range "]] [\ LIT_ESCAPED_CHAR "\\'"] [DQ [VarSub expected]] [\ LIT_ESCAPED_CHAR "\\'"] [DQ [LIT_CHARS " c..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]} {[LIT_CHARS -i]}) (FunctionDef test_run_rebase [] (List (= scope= flags=0 words=[] bindings=[('result', {[VarSub 1]})]) (Com {[LIT_CHARS shift]}) (= scope= flags=0 words=[] bindings=[('expected', {[VarSub 1]})]) (Com {[LIT_CHARS shift]}) (Com {[LIT_CHARS test_expect_] [VarSub result]} {[DQ [LIT_CHARS "rebase "][VarSub *][LIT_CHARS " of non-linear history with merges after upstream merge is linearized"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " c v &&\n"][LIT_CHARS "\t\ttest_cmp_rev c HEAD~4 &&\n"][LIT_CHARS "\t\ttest_linear_range "]] [\ LIT_ESCAPED_CHAR "\\'"] [DQ [VarSub expected]] [\ LIT_ESCAPED_CHAR "\\'"] [DQ [LIT_CHARS " c..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]} {[LIT_CHARS -i]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p is no-op in non-linear history"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p d w &&\n"][LIT_CHARS "\ttest_cmp_rev w HEAD\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p is no-op when base inside second parent"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p e w &&\n"][LIT_CHARS "\ttest_cmp_rev w HEAD\n"]]}) (Com {[LIT_CHARS test_expect_failure]} {[DQ [LIT_CHARS "rebase -p --root on non-linear history is a no-op"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p --root w &&\n"][LIT_CHARS "\ttest_cmp_rev w HEAD\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p re-creates merge from side branch"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p z w &&\n"][LIT_CHARS "\ttest_cmp_rev z HEAD^ &&\n"][LIT_CHARS "\ttest_cmp_rev w^2 HEAD^2\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p re-creates internal merge"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p c w &&\n"][LIT_CHARS "\ttest_cmp_rev c HEAD~4 &&\n"][LIT_CHARS "\ttest_cmp_rev HEAD^2^ HEAD~3 &&\n"][LIT_CHARS "\ttest_revision_subjects 'd n e o w' HEAD~3 HEAD~2 HEAD^2 HEAD^ HEAD\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p can re-create two branches on onto"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p --onto c d w &&\n"][LIT_CHARS "\ttest_cmp_rev c HEAD~3 &&\n"][LIT_CHARS "\ttest_cmp_rev c HEAD^2^ &&\n"][LIT_CHARS "\ttest_revision_subjects 'n e o w' HEAD~2 HEAD^2 HEAD^ HEAD\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p re-creates history around dropped commit matching upstream"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p h u &&\n"][LIT_CHARS "\ttest_cmp_rev h HEAD~3 &&\n"][LIT_CHARS "\ttest_cmp_rev HEAD^2^ HEAD~2 &&\n"][LIT_CHARS "\ttest_revision_subjects 'd i e u' HEAD~2 HEAD^2 HEAD^ HEAD\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p --onto in merged history drops patches in upstream"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p --onto f h u &&\n"][LIT_CHARS "\ttest_cmp_rev f HEAD~3 &&\n"][LIT_CHARS "\ttest_cmp_rev HEAD^2^ HEAD~2 &&\n"][LIT_CHARS "\ttest_revision_subjects 'd i e u' HEAD~2 HEAD^2 HEAD^ HEAD\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p --onto in merged history does not drop patches in onto"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p --onto h f u &&\n"][LIT_CHARS "\ttest_cmp_rev h HEAD~3 &&\n"][LIT_CHARS "\ttest_cmp_rev HEAD^2~2 HEAD~2 &&\n"][LIT_CHARS "\ttest_revision_subjects 'd gp i e u' HEAD~2 HEAD^2^ HEAD^2 HEAD^ HEAD\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_failure]} {[DQ [LIT_CHARS "rebase -p drops merge commit when entire first-parent side is dropped"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p h s &&\n"][LIT_CHARS "\ttest_cmp_rev h HEAD~2 &&\n"][LIT_CHARS "\ttest_linear_range 'd e' h..\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p drops merge commit when entire second-parent side is dropped"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p h t &&\n"][LIT_CHARS "\ttest_cmp_rev h HEAD~2 &&\n"][LIT_CHARS "\ttest_linear_range 'd e' h..\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p re-creates empty internal merge commit"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p c r &&\n"][LIT_CHARS "\ttest_cmp_rev c HEAD~3 &&\n"][LIT_CHARS "\ttest_cmp_rev HEAD^2^ HEAD~2 &&\n"][LIT_CHARS "\ttest_revision_subjects 'd e n r' HEAD~2 HEAD^2 HEAD^ HEAD\n"]]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "rebase -p re-creates empty merge commit"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\treset_rebase &&\n"][LIT_CHARS "\tgit rebase -p o r &&\n"][LIT_CHARS "\ttest_cmp_rev e HEAD^2 &&\n"][LIT_CHARS "\ttest_cmp_rev o HEAD^ &&\n"][LIT_CHARS "\ttest_revision_subjects 'r' HEAD\n"]]}) (Com {[LIT_CHARS test_done]}) )