(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]}) (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 "simple rebase "][VarSub *]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " c e &&\n"][LIT_CHARS "\t\ttest_cmp_rev c HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'd e' c..\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " is no-op if upstream is an ancestor"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " b e &&\n"][LIT_CHARS "\t\ttest_cmp_rev e HEAD\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " -f rewrites even if upstream is an ancestor"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " -f b e &&\n"][LIT_CHARS "\t\t! test_cmp_rev e HEAD &&\n"][LIT_CHARS "\t\ttest_cmp_rev b HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'd e' b..\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -p]}) (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 " fast-forwards from ancestor of upstream"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " e b &&\n"][LIT_CHARS "\t\ttest_cmp_rev e HEAD\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " drops patches in upstream"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " h i &&\n"][LIT_CHARS "\t\ttest_cmp_rev h HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'd i' h..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -i]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " can drop last patch if in upstream"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " h gp &&\n"][LIT_CHARS "\t\ttest_cmp_rev h HEAD^ &&\n"][LIT_CHARS "\t\ttest_linear_range 'd' h..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -i]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " --onto drops patches in upstream"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " --onto f h i &&\n"][LIT_CHARS "\t\ttest_cmp_rev f HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'd i' f..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -i]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " --onto does not drop patches in onto"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " --onto h f i &&\n"][LIT_CHARS "\t\ttest_cmp_rev h HEAD~3 &&\n"][LIT_CHARS "\t\ttest_linear_range 'd gp i' h..\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " drops empty commit"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " c l &&\n"][LIT_CHARS "\t\ttest_cmp_rev c HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'd l' c..\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " --keep-empty"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " --keep-empty c l &&\n"][LIT_CHARS "\t\ttest_cmp_rev c HEAD~3 &&\n"][LIT_CHARS "\t\ttest_linear_range 'd k l' c..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -i]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -p]}) (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 " --keep-empty keeps empty even if already in upstream"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " --keep-empty j l &&\n"][LIT_CHARS "\t\ttest_cmp_rev j HEAD~3 &&\n"][LIT_CHARS "\t\ttest_linear_range 'd k l' j..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -i]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -p]}) (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 " --onto --root"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " --onto c --root y &&\n"][LIT_CHARS "\t\ttest_cmp_rev c HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'x y' c..\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " without --onto --root with disjoint history"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " c y &&\n"][LIT_CHARS "\t\ttest_cmp_rev c HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'x y' c..\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -p]}) (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 " --onto --root drops patch in onto"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " --onto m --root bp &&\n"][LIT_CHARS "\t\ttest_cmp_rev m HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'x y' m..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -i]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (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 " --onto --root with merge-base does not go to root"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " --onto m --root g &&\n"][LIT_CHARS "\t\ttest_cmp_rev m HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'c g' m..\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -p]}) (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 " without --onto --root with disjoint history drops patch in onto"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " m bp &&\n"][LIT_CHARS "\t\ttest_cmp_rev m HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'x y' m..\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -i]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -p]}) (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 " --root on linear history is a no-op"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " --root c &&\n"][LIT_CHARS "\t\ttest_cmp_rev c HEAD\n"][LIT_CHARS "\t"]]}) ) ) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[SQ ]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -m]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -i]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS failure]} {[LIT_CHARS -p]}) (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 " -f --root on linear history causes re-write"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\treset_rebase &&\n"][LIT_CHARS "\t\tgit rebase "][VarSub *][LIT_CHARS " -f --root c &&\n"][LIT_CHARS "\t\t! test_cmp_rev a HEAD~2 &&\n"][LIT_CHARS "\t\ttest_linear_range 'a b c' HEAD\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]}) (Com {[LIT_CHARS test_run_rebase]} {[LIT_CHARS success]} {[LIT_CHARS -p]}) (Com {[LIT_CHARS test_done]}) )