(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'git rebase --onto A...B'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY') (/lib-rebase.sh))}) (C {(test_expect_success)} {(setup)} { (SQ <'\n'> <'\ttest_commit A &&\n'> <'\ttest_commit B &&\n'> <'\tgit branch side &&\n'> <'\ttest_commit C &&\n'> <'\tgit branch topic &&\n'> <'\tgit checkout side &&\n'> <'\ttest_commit H &&\n'> <'\tgit checkout master &&\n'> <'\ttest_tick &&\n'> <'\tgit merge H &&\n'> <'\tgit tag D &&\n'> <'\ttest_commit E &&\n'> <'\tgit checkout topic &&\n'> <'\ttest_commit F &&\n'> <'\ttest_commit G &&\n'> <'\tgit checkout side &&\n'> <'\ttest_tick &&\n'> <'\tgit merge C &&\n'> <'\tgit tag I &&\n'> <'\ttest_commit J &&\n'> <'\ttest_commit K\n'> ) } ) (C {(test_expect_success)} {(SQ <'rebase --onto master...topic'>)} { (SQ <'\n'> <'\tgit reset --hard &&\n'> <'\tgit checkout topic &&\n'> <'\tgit reset --hard G &&\n'> <'\n'> <'\tgit rebase --onto master...topic F &&\n'> <'\tgit rev-parse HEAD^1 >actual &&\n'> <'\tgit rev-parse C^0 >expect &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'rebase --onto master...'>)} { (SQ <'\n'> <'\tgit reset --hard &&\n'> <'\tgit checkout topic &&\n'> <'\tgit reset --hard G &&\n'> <'\n'> <'\tgit rebase --onto master... F &&\n'> <'\tgit rev-parse HEAD^1 >actual &&\n'> <'\tgit rev-parse C^0 >expect &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'rebase --onto master...side'>)} { (SQ <'\n'> <'\tgit reset --hard &&\n'> <'\tgit checkout side &&\n'> <'\tgit reset --hard K &&\n'> <'\n'> <'\ttest_must_fail git rebase --onto master...side J\n'> ) } ) (C {(test_expect_success)} {(SQ <'rebase -i --onto master...topic'>)} { (SQ <'\n'> <'\tgit reset --hard &&\n'> <'\tgit checkout topic &&\n'> <'\tgit reset --hard G &&\n'> <'\tset_fake_editor &&\n'> <'\tEXPECT_COUNT=1 git rebase -i --onto master...topic F &&\n'> <'\tgit rev-parse HEAD^1 >actual &&\n'> <'\tgit rev-parse C^0 >expect &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'rebase -i --onto master...'>)} { (SQ <'\n'> <'\tgit reset --hard &&\n'> <'\tgit checkout topic &&\n'> <'\tgit reset --hard G &&\n'> <'\tset_fake_editor &&\n'> <'\tEXPECT_COUNT=1 git rebase -i --onto master... F &&\n'> <'\tgit rev-parse HEAD^1 >actual &&\n'> <'\tgit rev-parse C^0 >expect &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'rebase -i --onto master...side'>)} { (SQ <'\n'> <'\tgit reset --hard &&\n'> <'\tgit checkout side &&\n'> <'\tgit reset --hard K &&\n'> <'\n'> <'\ttest_must_fail git rebase -i --onto master...side J\n'> ) } ) (C {(test_done)}) ] )