(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 <'checkout can switch to last branch and merge base'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <setup>)}
        {
          (SQ <'\n'> <'\techo hello >world &&\n'> <'\tgit add world &&\n'> 
            <'\tgit commit -m initial &&\n'> <'\tgit branch other &&\n'> <'\techo "hello again" >>world &&\n'> <'\tgit add world &&\n'> 
            <'\tgit commit -m second\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'"checkout -" does not work initially'>)}
        {(SQ <'\n'> <'\ttest_must_fail git checkout -\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'first branch switch'>)}
        {(SQ <'\n'> <'\tgit checkout other\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'"checkout -" switches back'>)}
        {
          (SQ <'\n'> <'\tgit checkout - &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'"checkout -" switches forth'>)}
        {
          (SQ <'\n'> <'\tgit checkout - &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/other"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'detach HEAD'>)}
        {(SQ <'\n'> <'\tgit checkout $(git rev-parse HEAD)\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'"checkout -" attaches again'>)}
        {
          (SQ <'\n'> <'\tgit checkout - &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/other"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'"checkout -" detaches again'>)}
        {
          (SQ <'\n'> <'\tgit checkout - &&\n'> 
            <'\ttest "z$(git rev-parse HEAD)" = "z$(git rev-parse other)" &&\n'> <'\ttest_must_fail git symbolic-ref HEAD\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'more switches'>)}
        {
          (SQ <'\n'> <'\tfor i in 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1\n'> <'\tdo\n'> 
            <'\t\tgit checkout -b branch$i\n'> <'\tdone\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <more_switches>
      name: more_switches
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [i]
              iterable: 
                (for_iter.Words
                  words: [
                    {<16>}
                    {<15>}
                    {<14>}
                    {<13>}
                    {<12>}
                    {<11>}
                    {<10>}
                    {<9>}
                    {<8>}
                    {<7>}
                    {<6>}
                    {<5>}
                    {<4>}
                    {<3>}
                    {<2>}
                    {<1>}
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Simple
                      blame_tok: <git>
                      more_env: []
                      words: [{<git>} {<checkout>} {<branch> ($ Id.VSub_DollarName i)}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'switch to the last'>)}
        {
          (SQ <'\n'> <'\tmore_switches &&\n'> <'\tgit checkout @{-1} &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch2"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'switch to second from the last'>)}
        {
          (SQ <'\n'> <'\tmore_switches &&\n'> <'\tgit checkout @{-2} &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch3"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'switch to third from the last'>)}
        {
          (SQ <'\n'> <'\tmore_switches &&\n'> <'\tgit checkout @{-3} &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch4"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'switch to fourth from the last'>)}
        {
          (SQ <'\n'> <'\tmore_switches &&\n'> <'\tgit checkout @{-4} &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch5"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'switch to twelfth from the last'>)}
        {
          (SQ <'\n'> <'\tmore_switches &&\n'> <'\tgit checkout @{-12} &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch13"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'merge base test setup'>)}
        {
          (SQ <'\n'> <'\tgit checkout -b another other &&\n'> <'\techo "hello again" >>world &&\n'> 
            <'\tgit add world &&\n'> <'\tgit commit -m third\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <another...master>)}
        {
          (SQ <'\n'> <'\tgit checkout another &&\n'> <'\tgit checkout another...master &&\n'> 
            <'\ttest "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <...master>)}
        {
          (SQ <'\n'> <'\tgit checkout another &&\n'> <'\tgit checkout ...master &&\n'> 
            <'\ttest "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <master...>)}
        {
          (SQ <'\n'> <'\tgit checkout another &&\n'> <'\tgit checkout master... &&\n'> 
            <'\ttest "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'"checkout -" works after a rebase A'>)}
        {
          (SQ <'\n'> <'\tgit checkout master &&\n'> <'\tgit checkout other &&\n'> 
            <'\tgit rebase master &&\n'> <'\tgit checkout - &&\n'> <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'"checkout -" works after a rebase A B'>)}
        {
          (SQ <'\n'> <'\tgit branch moodle master~1 &&\n'> <'\tgit checkout master &&\n'> 
            <'\tgit checkout other &&\n'> <'\tgit rebase master moodle &&\n'> <'\tgit checkout - &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'"checkout -" works after a rebase -i A'>)}
        {
          (SQ <'\n'> <'\tgit checkout master &&\n'> <'\tgit checkout other &&\n'> 
            <'\tgit rebase -i master &&\n'> <'\tgit checkout - &&\n'> <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'"checkout -" works after a rebase -i A B'>)}
        {
          (SQ <'\n'> <'\tgit branch foodle master~1 &&\n'> <'\tgit checkout master &&\n'> 
            <'\tgit checkout other &&\n'> <'\tgit rebase master foodle &&\n'> <'\tgit checkout - &&\n'> 
            <'\ttest "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)