(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'git rebase --abort tests'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:work_dir) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [20 22] ) ('/test dir') ) } spids: [18] ) ] spids: [18] ) (C {(test_expect_success)} {(setup)} { (SQ <'\n'> <'\tmkdir -p "$work_dir" &&\n'> <'\tcd "$work_dir" &&\n'> <'\tgit init &&\n'> <'\techo a > a &&\n'> <'\tgit add a &&\n'> <'\tgit commit -m a &&\n'> <'\tgit branch to-rebase &&\n'> <'\n'> <'\techo b > a &&\n'> <'\tgit commit -a -m b &&\n'> <'\techo c > a &&\n'> <'\tgit commit -a -m c &&\n'> <'\n'> <'\tgit checkout to-rebase &&\n'> <'\techo d > a &&\n'> <'\tgit commit -a -m "merge should fail on this" &&\n'> <'\techo e > a &&\n'> <'\tgit commit -a -m "merge should fail on this, too" &&\n'> <'\tgit branch pre-rebase\n'> ) } ) (FuncDef name: testrebase body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:type) op: Equal rhs: {($ VSub_Number '$1')} spids: [62] ) ] spids: [62] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:dotest) op: Equal rhs: {($ VSub_Number '$2')} spids: [66] ) ] spids: [66] ) (C {(test_expect_success)} {(DQ (rebase) ($ VSub_Name '$type') (' --abort'))} { (SQ <'\n'> <'\t\tcd "$work_dir" &&\n'> <'\t\t# Clean up the state from the previous one\n'> <'\t\tgit reset --hard pre-rebase &&\n'> <'\t\ttest_must_fail git rebase$type master &&\n'> <'\t\ttest_path_is_dir "$dotest" &&\n'> <'\t\tgit rebase --abort &&\n'> <'\t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n'> <'\t\ttest ! -d "$dotest"\n'> <'\t'> ) } ) (C {(test_expect_success)} {(DQ (rebase) ($ VSub_Name '$type') (' --abort after --skip'))} { (SQ <'\n'> <'\t\tcd "$work_dir" &&\n'> <'\t\t# Clean up the state from the previous one\n'> <'\t\tgit reset --hard pre-rebase &&\n'> <'\t\ttest_must_fail git rebase$type master &&\n'> <'\t\ttest_path_is_dir "$dotest" &&\n'> <'\t\ttest_must_fail git rebase --skip &&\n'> <'\t\ttest $(git rev-parse HEAD) = $(git rev-parse master) &&\n'> <'\t\tgit rebase --abort &&\n'> <'\t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n'> <'\t\ttest ! -d "$dotest"\n'> <'\t'> ) } ) (C {(test_expect_success)} {(DQ (rebase) ($ VSub_Name '$type') (' --abort after --continue'))} { (SQ <'\n'> <'\t\tcd "$work_dir" &&\n'> <'\t\t# Clean up the state from the previous one\n'> <'\t\tgit reset --hard pre-rebase &&\n'> <'\t\ttest_must_fail git rebase$type master &&\n'> <'\t\ttest_path_is_dir "$dotest" &&\n'> <'\t\techo c > a &&\n'> <'\t\techo d >> a &&\n'> <'\t\tgit add a &&\n'> <'\t\ttest_must_fail git rebase --continue &&\n'> <'\t\ttest $(git rev-parse HEAD) != $(git rev-parse master) &&\n'> <'\t\tgit rebase --abort &&\n'> <'\t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n'> <'\t\ttest ! -d "$dotest"\n'> <'\t'> ) } ) (C {(test_expect_success)} {(DQ (rebase) ($ VSub_Name '$type') (' --abort does not update reflog'))} { (SQ <'\n'> <'\t\tcd "$work_dir" &&\n'> <'\t\t# Clean up the state from the previous one\n'> <'\t\tgit reset --hard pre-rebase &&\n'> <'\t\tgit reflog show to-rebase > reflog_before &&\n'> <'\t\ttest_must_fail git rebase$type master &&\n'> <'\t\tgit rebase --abort &&\n'> <'\t\tgit reflog show to-rebase > reflog_after &&\n'> <'\t\ttest_cmp reflog_before reflog_after &&\n'> <'\t\trm reflog_before reflog_after\n'> <'\t'> ) } ) (C {(test_expect_success)} {(SQ <'rebase --abort can not be used with other options'>)} { (SQ <'\n'> <'\t\tcd "$work_dir" &&\n'> <'\t\t# Clean up the state from the previous one\n'> <'\t\tgit reset --hard pre-rebase &&\n'> <'\t\ttest_must_fail git rebase$type master &&\n'> <'\t\ttest_must_fail git rebase -v --abort &&\n'> <'\t\ttest_must_fail git rebase --abort -v &&\n'> <'\t\tgit rebase --abort\n'> <'\t'> ) } ) ] spids: [59] ) spids: [55 58] ) (C {(testrebase)} {(DQ )} {(.git/rebase-apply)}) (C {(testrebase)} {(DQ (' --merge'))} {(.git/rebase-merge)}) (C {(test_done)}) ] )