(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 <'fetch handles conflicting refspecs correctly'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (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: 
            {
              (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.ShFunction
      name_tok: <setup_repository>
      name: setup_repository
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<init>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.Subshell
                  left: <Id.Op_LParen _>
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <cd>
                          more_env: []
                          words: [{<cd>} {(DQ ($ Id.VSub_Number 1))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<config>} {<remote.origin.url>} {(DQ ($ Id.VSub_DollarName D))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <shift>
                          more_env: []
                          words: [{<shift>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.ForEach
                          keyword: <Id.KW_For for>
                          iter_names: [refspec]
                          iterable: (for_iter.Words words:[{(DQ ($ Id.VSub_At '@'))}])
                          body: 
                            (command.DoGroup
                              left: <Id.KW_Do do>
                              children: [
                                (command.Simple
                                  blame_tok: <git>
                                  more_env: []
                                  words: [
                                    {<git>}
                                    {<config>}
                                    {<--add>}
                                    {<remote.origin.fetch>}
                                    {(DQ ($ Id.VSub_DollarName refspec))}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              right: <Id.KW_Done done>
                            )
                          redirects: []
                        )
                      ]
                      ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
                    )
                  right: <Id.Right_Subshell _>
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <verify_stderr>
      name: verify_stderr
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <cat>
                  more_env: []
                  words: [{<cat>}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})]
                  do_fork: T
                )
                (command.Pipeline
                  children: [
                    (command.Simple
                      blame_tok: <test_i18ngrep>
                      more_env: []
                      words: [{<test_i18ngrep>} {<-E>} {(SQ <'^(fatal|warning):'>)}]
                      redirects: [(Redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<error>})]
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <grep>
                      more_env: []
                      words: [{<grep>} {<-v>} {(SQ <'hung up'>)}]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<actual>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <sort>
                      more_env: []
                      words: [{<sort>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_Pipe _> <Id.Op_Pipe _>]
                )
                (command.Simple
                  blame_tok: <test_i18ncmp>
                  more_env: []
                  words: [{<test_i18ncmp>} {<expected>} {<actual>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <setup>)}
        {
          (SQ <'\n'> <'\tgit commit --allow-empty -m "Initial" &&\n'> <'\tgit branch branch1 &&\n'> 
            <'\tgit tag tag1 &&\n'> <'\tgit commit --allow-empty -m "First" &&\n'> <'\tgit branch branch2 &&\n'> <'\tgit tag tag2\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fetch with no conflict'>)}
        {
          (SQ <'\n'> <'\tsetup_repository ok "+refs/heads/*:refs/remotes/origin/*" && (\n'> 
            <'\t\tcd ok &&\n'> <'\t\tgit fetch origin\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fetch conflict: config vs. config'>)}
        {
          (SQ <'\n'> <'\tsetup_repository ccc \\\n'> 
            <'\t\t"+refs/heads/branch1:refs/remotes/origin/branch1" \\\n'> <'\t\t"+refs/heads/branch2:refs/remotes/origin/branch1" && (\n'> <'\t\tcd ccc &&\n'> 
            <'\t\ttest_must_fail git fetch origin 2>error &&\n'> <'\t\tverify_stderr <<-\\EOF\n'> 
            <
'\t\tfatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1\n'
            > <'\t\tEOF\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fetch duplicate: config vs. config'>)}
        {
          (SQ <'\n'> <'\tsetup_repository dcc \\\n'> <'\t\t"+refs/heads/*:refs/remotes/origin/*" \\\n'> 
            <'\t\t"+refs/heads/branch1:refs/remotes/origin/branch1" && (\n'> <'\t\tcd dcc &&\n'> <'\t\tgit fetch origin\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fetch conflict: arg overrides config'>)}
        {
          (SQ <'\n'> <'\tsetup_repository aoc \\\n'> 
            <'\t\t"+refs/heads/*:refs/remotes/origin/*" && (\n'> <'\t\tcd aoc &&\n'> <'\t\tgit fetch origin refs/heads/branch2:refs/remotes/origin/branch1\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fetch conflict: arg vs. arg'>)}
        {
          (SQ <'\n'> <'\tsetup_repository caa && (\n'> <'\t\tcd caa &&\n'> 
            <'\t\ttest_must_fail git fetch origin \\\n'> <'\t\t\trefs/heads/*:refs/remotes/origin/* \\\n'> 
            <'\t\t\trefs/heads/branch2:refs/remotes/origin/branch1 2>error &&\n'> <'\t\tverify_stderr <<-\\EOF\n'> 
            <
'\t\tfatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1\n'
            > <'\t\tEOF\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'fetch conflict: criss-cross args'>)}
        {
          (SQ <'\n'> <'\tsetup_repository xaa \\\n'> 
            <'\t\t"+refs/heads/*:refs/remotes/origin/*" && (\n'> <'\t\tcd xaa &&\n'> <'\t\tgit fetch origin \\\n'> 
            <'\t\t\trefs/heads/branch1:refs/remotes/origin/branch2 \\\n'> <'\t\t\trefs/heads/branch2:refs/remotes/origin/branch1 2>error &&\n'> <'\t\tverify_stderr <<-\\EOF\n'> 
            <
'\t\twarning: refs/remotes/origin/branch1 usually tracks refs/heads/branch1, not refs/heads/branch2\n'
            > 
            <
'\t\twarning: refs/remotes/origin/branch2 usually tracks refs/heads/branch2, not refs/heads/branch1\n'
            > <'\t\tEOF\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)