(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'test_description='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'test_description='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git rebase --abort tests'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'work_dir='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'work_dir='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'work_dir='> name:work_dir)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (CommandSub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.Simple
                      blame_tok: <pwd>
                      more_env: []
                      words: [{<pwd>}]
                      redirects: []
                      do_fork: T
                    )
                  right: <Id.Eof_RParen _>
                ) <'/test dir'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<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'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <testrebase>
      name: testrebase
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'type='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'type='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'type='> name:type)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'dotest='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'dotest='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dotest='> name:dotest)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 2)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {(DQ <rebase> ($ Id.VSub_DollarName 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'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {(DQ <rebase> ($ Id.VSub_DollarName 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'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {(DQ <rebase> ($ Id.VSub_DollarName 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'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {(DQ <rebase> ($ Id.VSub_DollarName 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'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<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'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <testrebase>
      more_env: []
      words: [{<testrebase>} {(DQ )} {<'.git/rebase-apply'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <testrebase>
      more_env: []
      words: [{<testrebase>} {(DQ <' --merge'>)} {<'.git/rebase-merge'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)