(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 <'test git rev-parse'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <test_rev_parse>
      name: test_rev_parse
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'd='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'd='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'd='> name:d)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'bare='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'bare='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bare='> name:bare)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'gitdir='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'gitdir='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'gitdir='> name:gitdir)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              redirects: []
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Simple
                      blame_tok: <Id.Lit_Colon ':'>
                      more_env: []
                      words: [{<Id.Lit_Colon ':'>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Case
                      case_kw: <Id.KW_Case case>
                      to_match: (case_arg.Word w:{(DQ ($ Id.VSub_Number 1))})
                      arms_start: <Id.KW_In in>
                      arms: [
                        (CaseArm
                          left: <-C>
                          pattern: (pat.Words words:[{<-C>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  left: <Id.Lit_VarLike 'd='>
                                  pairs: [
                                    (AssignPair
                                      left: <Id.Lit_VarLike 'd='>
                                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'd='> name:d)
                                      op: assign_op.Equal
                                      rhs: {(DQ ($ Id.VSub_Number 2))}
                                    )
                                  ]
                                  redirects: []
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <shift>
                                  more_env: []
                                  words: [{<shift>}]
                                  redirects: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-b>
                          pattern: (pat.Words words:[{<-b>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Case
                              case_kw: <Id.KW_Case case>
                              to_match: (case_arg.Word w:{(DQ ($ Id.VSub_Number 2))})
                              arms_start: <Id.KW_In in>
                              arms: [
                                (CaseArm
                                  left: <Id.Lit_LBracket '['>
                                  pattern: 
                                    (pat.Words
                                      words: [
                                        {<Id.Lit_LBracket '['> <tfu> <Id.Lit_RBracket ']'> 
                                          <Id.Lit_Star '*'>
                                        }
                                      ]
                                    )
                                  middle: <Id.Right_CasePat _>
                                  action: [
                                    (command.Sentence
                                      child: 
                                        (command.ShAssignment
                                          left: <Id.Lit_VarLike 'bare='>
                                          pairs: [
                                            (AssignPair
                                              left: <Id.Lit_VarLike 'bare='>
                                              lhs: 
                                                (sh_lhs_expr.Name
                                                  left: <Id.Lit_VarLike 'bare='>
                                                  name: bare
                                                )
                                              op: assign_op.Equal
                                              rhs: {(DQ ($ Id.VSub_Number 2))}
                                            )
                                          ]
                                          redirects: []
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                    (command.Sentence
                                      child: 
                                        (command.Simple
                                          blame_tok: <shift>
                                          more_env: []
                                          words: [{<shift>}]
                                          redirects: []
                                          do_fork: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                    (command.Simple
                                      blame_tok: <shift>
                                      more_env: []
                                      words: [{<shift>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  right: <Id.Op_DSemi _>
                                )
                                (CaseArm
                                  left: <Id.Lit_Star '*'>
                                  pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                                  middle: <Id.Right_CasePat _>
                                  action: [
                                    (command.Simple
                                      blame_tok: <error>
                                      more_env: []
                                      words: [
                                        {<error>}
                                        {
                                          (DQ <'test_rev_parse: bogus core.bare value \''> 
                                            ($ Id.VSub_Number 2) <'\''>
                                          )
                                        }
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  right: <Id.Op_DSemi _>
                                )
                              ]
                              arms_end: <Id.KW_Esac esac>
                              redirects: []
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-g>
                          pattern: (pat.Words words:[{<-g>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  left: <Id.Lit_VarLike 'gitdir='>
                                  pairs: [
                                    (AssignPair
                                      left: <Id.Lit_VarLike 'gitdir='>
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'gitdir='>
                                          name: gitdir
                                        )
                                      op: assign_op.Equal
                                      rhs: {(DQ ($ Id.VSub_Number 2))}
                                    )
                                  ]
                                  redirects: []
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <shift>
                                  more_env: []
                                  words: [{<shift>}]
                                  redirects: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <->
                          pattern: (pat.Words words:[{<-> <Id.Lit_Star '*'>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Simple
                              blame_tok: <error>
                              more_env: []
                              words: [
                                {<error>}
                                {
                                  (DQ <'test_rev_parse: unrecognized option \''> ($ Id.VSub_Number 1) 
                                    <'\''>
                                  )
                                }
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <Id.Lit_Star '*'>
                          pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                          middle: <Id.Right_CasePat _>
                          action: [(command.ControlFlow keyword:<Id.ControlFlow_Break break>)]
                          right: <Id.Op_DSemi _>
                        )
                      ]
                      arms_end: <Id.KW_Esac esac>
                      redirects: []
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'name='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'name='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'name='> name:name)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <shift>
              more_env: []
              words: [{<shift>}]
              redirects: []
              do_fork: T
            )
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [o]
              iterable: 
                (for_iter.Words
                  words: [
                    {<--is-bare-repository>}
                    {<--is-inside-git-dir>}
                    {<--is-inside-work-tree>}
                    {<--show-prefix>}
                    {<--git-dir>}
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <test>
                          more_env: []
                          words: [{<test>} {($ Id.VSub_Pound '#')} {<-eq>} {<0>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.ControlFlow
                          keyword: <Id.ControlFlow_Break break>
                        )
                      ]
                      ops: [<Id.Op_DAmp _>]
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'expect='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'expect='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'expect='> name:expect)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number 1))}
                        )
                      ]
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <test_expect_success>
                      more_env: []
                      words: [
                        {<test_expect_success>}
                        {(DQ ($ Id.VSub_DollarName name) <': '> ($ Id.VSub_DollarName o))}
                        {
                          (SQ <'\n'> <'\t\t\tif test -n "$gitdir"\n'> <'\t\t\tthen\n'> 
                            <'\t\t\t\ttest_when_finished "unset GIT_DIR" &&\n'> <'\t\t\t\tGIT_DIR="$gitdir" &&\n'> <'\t\t\t\texport GIT_DIR\n'> <'\t\t\tfi &&\n'> <'\n'> 
                            <'\t\t\tcase "$bare" in\n'> <'\t\t\tt*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;\n'> 
                            <'\t\t\tf*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;\n'> <'\t\t\tu*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;\n'> <'\t\t\tesac &&\n'> <'\n'> 
                            <'\t\t\techo "$expect" >expect &&\n'> <'\t\t\tgit ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&\n'> <'\t\t\ttest_cmp expect actual\n'> <'\t\t'>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ROOT='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ROOT='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ROOT='> name:ROOT)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <pwd>
                    more_env: []
                    words: [{<pwd>}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <setup>)}
        {(SQ <'\n'> <'\tmkdir -p sub/dir work &&\n'> <'\tcp -R .git repo.git\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [{<test_rev_parse>} {<toplevel>} {<false>} {<false>} {<true>} {(SQ )} {<.git>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [{<test_rev_parse>} {<-C>} {<.git>} {<'.git/'>} {<false>} {<true>} {<false>} {(SQ )} {<.>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [
        {<test_rev_parse>}
        {<-C>}
        {<'.git/objects'>}
        {<'.git/objects/'>}
        {<false>}
        {<true>}
        {<false>}
        {(SQ )}
        {(DQ ($ Id.VSub_DollarName ROOT) <'/.git'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [
        {<test_rev_parse>}
        {<-C>}
        {<'sub/dir'>}
        {<subdirectory>}
        {<false>}
        {<false>}
        {<true>}
        {<'sub/dir/'>}
        {(DQ ($ Id.VSub_DollarName ROOT) <'/.git'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [{<test_rev_parse>} {<-b>} {<t>} {(SQ <'core.bare = true'>)} {<true>} {<false>} {<false>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [{<test_rev_parse>} {<-b>} {<u>} {(SQ <'core.bare undefined'>)} {<false>} {<false>} {<true>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [
        {<test_rev_parse>}
        {<-C>}
        {<work>}
        {<-g>}
        {<'../.git'>}
        {<-b>}
        {<f>}
        {(SQ <'GIT_DIR=../.git, core.bare = false'>)}
        {<false>}
        {<false>}
        {<true>}
        {(SQ )}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [
        {<test_rev_parse>}
        {<-C>}
        {<work>}
        {<-g>}
        {<'../.git'>}
        {<-b>}
        {<t>}
        {(SQ <'GIT_DIR=../.git, core.bare = true'>)}
        {<true>}
        {<false>}
        {<false>}
        {(SQ )}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [
        {<test_rev_parse>}
        {<-C>}
        {<work>}
        {<-g>}
        {<'../.git'>}
        {<-b>}
        {<u>}
        {(SQ <'GIT_DIR=../.git, core.bare undefined'>)}
        {<false>}
        {<false>}
        {<true>}
        {(SQ )}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [
        {<test_rev_parse>}
        {<-C>}
        {<work>}
        {<-g>}
        {<'../repo.git'>}
        {<-b>}
        {<f>}
        {(SQ <'GIT_DIR=../repo.git, core.bare = false'>)}
        {<false>}
        {<false>}
        {<true>}
        {(SQ )}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [
        {<test_rev_parse>}
        {<-C>}
        {<work>}
        {<-g>}
        {<'../repo.git'>}
        {<-b>}
        {<t>}
        {(SQ <'GIT_DIR=../repo.git, core.bare = true'>)}
        {<true>}
        {<false>}
        {<false>}
        {(SQ )}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_rev_parse>
      more_env: []
      words: [
        {<test_rev_parse>}
        {<-C>}
        {<work>}
        {<-g>}
        {<'../repo.git'>}
        {<-b>}
        {<u>}
        {(SQ <'GIT_DIR=../repo.git, core.bare undefined'>)}
        {<false>}
        {<false>}
        {<true>}
        {(SQ )}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)