(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 switching away from an invalid branch'>)}
        )
      ]
      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'>)
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout should not start branch from a tree'>)}
        {(SQ <'\n'> <'\ttest_must_fail git checkout -b newbranch master^{tree}\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout master from invalid HEAD'>)}
        {(SQ <'\n'> <'\techo $_z40 >.git/HEAD &&\n'> <'\tgit checkout master --\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout notices failure to lock HEAD'>)}
        {
          (SQ <'\n'> <'\ttest_when_finished "rm -f .git/HEAD.lock" &&\n'> <'\t>.git/HEAD.lock &&\n'> 
            <'\ttest_must_fail git checkout -b other\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'create ref directory/file conflict scenario'>)}
        {
          (SQ <'\n'> <'\tgit update-ref refs/heads/outer/inner master &&\n'> <'\n'> 
            <'\t# do not rely on symbolic-ref to get a known state,\n'> <'\t# as it may use the same code we are testing\n'> <'\treset_to_df () {\n'> 
            <'\t\techo "ref: refs/heads/outer" >.git/HEAD\n'> <'\t}\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout away from d/f HEAD (unpacked, to branch)'>)}
        {(SQ <'\n'> <'\treset_to_df &&\n'> <'\tgit checkout master\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout away from d/f HEAD (unpacked, to detached)'>)}
        {(SQ <'\n'> <'\treset_to_df &&\n'> <'\tgit checkout --detach master\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'pack refs'>)}
        {(SQ <'\n'> <'\tgit pack-refs --all --prune\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout away from d/f HEAD (packed, to branch)'>)}
        {(SQ <'\n'> <'\treset_to_df &&\n'> <'\tgit checkout master\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'checkout away from d/f HEAD (packed, to detached)'>)}
        {(SQ <'\n'> <'\treset_to_df &&\n'> <'\tgit checkout --detach master\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)