(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 check-ref-format'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <valid_ref>
      name: valid_ref
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'prereq='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'prereq='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prereq='> name:prereq)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              redirects: []
            )
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{($ Id.VSub_Number 1)})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <Id.Lit_LBracket '['>
                  pattern: 
                    (pat.Words
                      words: [
                        {<Id.Lit_LBracket '['> <A-Z> <Id.KW_Bang '!'> <Id.Lit_RBracket ']'> 
                          <Id.Lit_Star '*'>
                        }
                      ]
                    )
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'prereq='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'prereq='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prereq='> name:prereq)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number 1)}
                        )
                      ]
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'desc='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'desc='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'desc='> name:desc)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ <'ref name \''> ($ Id.VSub_Number 1) <'\' is valid'> 
                        (BracedVarSub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Number 2>
                          var_name: 2
                          suffix_op: 
                            (suffix_op.Unary
                              op: <Id.VTest_ColonPlus _>
                              arg_word: {<' with options '> ($ Id.VSub_Number 2)}
                            )
                          right: <Id.Right_DollarBrace '}'>
                        )
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {($ Id.VSub_DollarName prereq)}
                {(DQ ($ Id.VSub_DollarName desc))}
                {
                  (DQ <'\n'> <'\t\tgit check-ref-format '> ($ Id.VSub_Number 2) <' \''> 
                    ($ Id.VSub_Number 1) <'\'\n'> <'\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <invalid_ref>
      name: invalid_ref
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'prereq='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'prereq='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prereq='> name:prereq)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              redirects: []
            )
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{($ Id.VSub_Number 1)})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <Id.Lit_LBracket '['>
                  pattern: 
                    (pat.Words
                      words: [
                        {<Id.Lit_LBracket '['> <A-Z> <Id.KW_Bang '!'> <Id.Lit_RBracket ']'> 
                          <Id.Lit_Star '*'>
                        }
                      ]
                    )
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'prereq='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'prereq='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prereq='> name:prereq)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number 1)}
                        )
                      ]
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'desc='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'desc='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'desc='> name:desc)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ <'ref name \''> ($ Id.VSub_Number 1) <'\' is invalid'> 
                        (BracedVarSub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Number 2>
                          var_name: 2
                          suffix_op: 
                            (suffix_op.Unary
                              op: <Id.VTest_ColonPlus _>
                              arg_word: {<' with options '> ($ Id.VSub_Number 2)}
                            )
                          right: <Id.Right_DollarBrace '}'>
                        )
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {($ Id.VSub_DollarName prereq)}
                {(DQ ($ Id.VSub_DollarName desc))}
                {
                  (DQ <'\n'> <'\t\ttest_must_fail git check-ref-format '> ($ Id.VSub_Number 2) <' \''> 
                    ($ Id.VSub_Number 1) <'\'\n'> <'\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ )}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'/'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'/'>)} {<--allow-onelevel>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'/'>)} {<--normalize>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {<Id.KW_Bang '!'> <MINGW>}
        {(SQ <'/'>)}
        {(SQ <'--allow-onelevel --normalize'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(SQ <'foo/bar/baz'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(SQ <'foo/bar/baz'>)} {<--normalize>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'refs///heads/foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(SQ <'refs///heads/foo'>)} {<--normalize>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'heads/foo/'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'/heads/foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'/heads/foo'>)} {<--normalize>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'///heads/foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(SQ <'///heads/foo'>)} {<--normalize>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'./foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'./foo/bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'foo/./bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'foo/bar/.'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'.refs/foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'refs/heads/foo.'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'heads/foo..bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'heads/foo?bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(SQ <'foo./bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'heads/foo.lock'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'heads///foo.lock'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'foo.lock/bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'foo.lock///bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(SQ <'heads/foo@bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'heads/v@{ation'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'heads/foo\\bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {
          (DQ 
            (CommandSub
              left_token: <Id.Left_DollarParen '$('>
              child: 
                (command.Simple
                  blame_tok: <printf>
                  more_env: []
                  words: [{<printf>} {(SQ <'heads/foo\\t'>)}]
                  redirects: []
                  do_fork: T
                )
              right: <Id.Eof_RParen _>
            )
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {
          (DQ 
            (CommandSub
              left_token: <Id.Left_DollarParen '$('>
              child: 
                (command.Simple
                  blame_tok: <printf>
                  more_env: []
                  words: [{<printf>} {(SQ <'heads/foo\\177'>)}]
                  redirects: []
                  do_fork: T
                )
              right: <Id.Eof_RParen _>
            )
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [
        {<valid_ref>}
        {
          (DQ 
            (CommandSub
              left_token: <Id.Left_DollarParen '$('>
              child: 
                (command.Simple
                  blame_tok: <printf>
                  more_env: []
                  words: [{<printf>} {(SQ <'heads/fu\\303\\237'>)}]
                  redirects: []
                  do_fork: T
                )
              right: <Id.Eof_RParen _>
            )
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(SQ <'heads/*foo/bar'>)} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(SQ <'heads/foo*/bar'>)} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(SQ <'heads/f*o/bar'>)} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'heads/f*o*/bar'>)} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(SQ <'heads/foo*/bar*'>)} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <foo>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--allow-onelevel>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [
        {<valid_ref>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--normalize>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {(SQ <'--allow-onelevel --normalize'>)}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <'foo/bar'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--allow-onelevel>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [
        {<valid_ref>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--normalize>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <'foo/*'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--allow-onelevel>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [
        {<valid_ref>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <'*/foo'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--allow-onelevel>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [
        {<valid_ref>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--normalize>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {(SQ <'--refspec-pattern --normalize'>)}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <'foo/*/bar'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--allow-onelevel>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [{<valid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [
        {<valid_ref>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <'*'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--allow-onelevel>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [
        {<valid_ref>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <'foo/*/*'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <'*/foo/*'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <'*/*/foo'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {(DQ ($ Id.VSub_DollarName ref))} {<--refspec-pattern>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ref='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ref='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ref='> name:ref)
          op: assign_op.Equal
          rhs: {(SQ <'/foo'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [{<invalid_ref>} {<Id.KW_Bang '!'> <MINGW>} {(DQ ($ Id.VSub_DollarName ref))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {<Id.KW_Bang '!'> <MINGW>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {<--allow-onelevel>}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {<Id.KW_Bang '!'> <MINGW>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {<--refspec-pattern>}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {<Id.KW_Bang '!'> <MINGW>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {<Id.KW_Bang '!'> <MINGW>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {<--normalize>}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [
        {<valid_ref>}
        {<Id.KW_Bang '!'> <MINGW>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--allow-onelevel --normalize'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref>
      more_env: []
      words: [
        {<invalid_ref>}
        {<Id.KW_Bang '!'> <MINGW>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --normalize'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref>
      more_env: []
      words: [
        {<valid_ref>}
        {<Id.KW_Bang '!'> <MINGW>}
        {(DQ ($ Id.VSub_DollarName ref))}
        {(SQ <'--refspec-pattern --allow-onelevel --normalize'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(DQ <'check-ref-format --branch @{-1}'>)}
        {
          (SQ <'\n'> <'\tT=$(git write-tree) &&\n'> <'\tsha1=$(echo A | git commit-tree $T) &&\n'> 
            <'\tgit update-ref refs/heads/master $sha1 &&\n'> <'\tgit update-ref refs/remotes/origin/master $sha1 &&\n'> <'\tgit checkout master &&\n'> 
            <'\tgit checkout origin/master &&\n'> <'\tgit checkout master &&\n'> <'\trefname=$(git check-ref-format --branch @{-1}) &&\n'> 
            <'\ttest "$refname" = "$sha1" &&\n'> <'\trefname2=$(git check-ref-format --branch @{-2}) &&\n'> <'\ttest "$refname2" = master'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'check-ref-format --branch from subdir'>)}
        {
          (SQ <'\n'> <'\tmkdir subdir &&\n'> <'\n'> <'\tT=$(git write-tree) &&\n'> 
            <'\tsha1=$(echo A | git commit-tree $T) &&\n'> <'\tgit update-ref refs/heads/master $sha1 &&\n'> 
            <'\tgit update-ref refs/remotes/origin/master $sha1 &&\n'> <'\tgit checkout master &&\n'> <'\tgit checkout origin/master &&\n'> <'\tgit checkout master &&\n'> 
            <'\trefname=$(\n'> <'\t\tcd subdir &&\n'> <'\t\tgit check-ref-format --branch @{-1}\n'> <'\t) &&\n'> 
            <'\ttest "$refname" = "$sha1"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <valid_ref_normalized>
      name: valid_ref_normalized
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'prereq='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'prereq='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prereq='> name:prereq)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              redirects: []
            )
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{($ Id.VSub_Number 1)})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <Id.Lit_LBracket '['>
                  pattern: 
                    (pat.Words
                      words: [
                        {<Id.Lit_LBracket '['> <A-Z> <Id.KW_Bang '!'> <Id.Lit_RBracket ']'> 
                          <Id.Lit_Star '*'>
                        }
                      ]
                    )
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'prereq='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'prereq='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prereq='> name:prereq)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number 1)}
                        )
                      ]
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {($ Id.VSub_DollarName prereq)}
                {
                  (DQ <'ref name \''> ($ Id.VSub_Number 1) <'\' simplifies to \''> ($ Id.VSub_Number 2) 
                    <'\''>
                  )
                }
                {
                  (DQ <'\n'> <'\t\trefname='> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\$'>
                      ch: '$'
                    ) <'(git check-ref-format --normalize \''> ($ Id.VSub_Number 1) <'\') &&\n'> <'\t\ttest '> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\"'>
                      ch: '"'
                    ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') <refname> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\"'>
                      ch: '"'
                    ) <' = \''> ($ Id.VSub_Number 2) <'\'\n'> <'\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <invalid_ref_normalized>
      name: invalid_ref_normalized
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'prereq='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'prereq='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prereq='> name:prereq)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              redirects: []
            )
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{($ Id.VSub_Number 1)})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <Id.Lit_LBracket '['>
                  pattern: 
                    (pat.Words
                      words: [
                        {<Id.Lit_LBracket '['> <A-Z> <Id.KW_Bang '!'> <Id.Lit_RBracket ']'> 
                          <Id.Lit_Star '*'>
                        }
                      ]
                    )
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'prereq='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'prereq='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prereq='> name:prereq)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number 1)}
                        )
                      ]
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <shift>
                      more_env: []
                      words: [{<shift>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {($ Id.VSub_DollarName prereq)}
                {(DQ <'check-ref-format --normalize rejects \''> ($ Id.VSub_Number 1) <'\''>)}
                {
                  (DQ <'\n'> <'\t\ttest_must_fail git check-ref-format --normalize \''> 
                    ($ Id.VSub_Number 1) <'\'\n'> <'\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <valid_ref_normalized>
      more_env: []
      words: [{<valid_ref_normalized>} {(SQ <'heads/foo'>)} {(SQ <'heads/foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref_normalized>
      more_env: []
      words: [{<valid_ref_normalized>} {(SQ <'refs///heads/foo'>)} {(SQ <'refs/heads/foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref_normalized>
      more_env: []
      words: [
        {<valid_ref_normalized>}
        {<Id.KW_Bang '!'> <MINGW>}
        {(SQ <'/heads/foo'>)}
        {(SQ <'heads/foo'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <valid_ref_normalized>
      more_env: []
      words: [{<valid_ref_normalized>} {(SQ <'///heads/foo'>)} {(SQ <'heads/foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref_normalized>
      more_env: []
      words: [{<invalid_ref_normalized>} {(SQ <foo>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref_normalized>
      more_env: []
      words: [{<invalid_ref_normalized>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'/foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref_normalized>
      more_env: []
      words: [{<invalid_ref_normalized>} {(SQ <'heads/foo/../bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref_normalized>
      more_env: []
      words: [{<invalid_ref_normalized>} {(SQ <'heads/./foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref_normalized>
      more_env: []
      words: [{<invalid_ref_normalized>} {(SQ <'heads\\foo'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref_normalized>
      more_env: []
      words: [{<invalid_ref_normalized>} {(SQ <'heads/foo.lock'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref_normalized>
      more_env: []
      words: [{<invalid_ref_normalized>} {(SQ <'heads///foo.lock'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref_normalized>
      more_env: []
      words: [{<invalid_ref_normalized>} {(SQ <'foo.lock/bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <invalid_ref_normalized>
      more_env: []
      words: [{<invalid_ref_normalized>} {(SQ <'foo.lock///bar'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)