(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 <'Merge logic in fetch'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'LF='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'LF='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'LF='> name:LF)
          op: assign_op.Equal
          rhs: {(SQ <'\n'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<setup>}
        {
          (SQ <'\n'> <'\tGIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" &&\n'> 
            <'\tGIT_COMMITTER_DATE="2006-06-26 00:00:00 +0000" &&\n'> <'\texport GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&\n'> <'\n'> <'\techo >file original &&\n'> 
            <'\tgit add file &&\n'> <'\tgit commit -a -m One &&\n'> <'\tgit tag tag-one &&\n'> <'\tgit tag tag-one-tree HEAD^{tree} &&\n'> 
            <'\tgit branch one &&\n'> <'\n'> <'\techo two >> file &&\n'> <'\tgit commit -a -m Two &&\n'> 
            <'\tgit tag -a -m "Tag Two" tag-two &&\n'> <'\tgit branch two &&\n'> <'\n'> <'\techo three >> file &&\n'> <'\tgit commit -a -m Three &&\n'> 
            <'\tgit tag -a -m "Tag Three" tag-three &&\n'> <'\tgit tag -a -m "Tag Three file" tag-three-file HEAD^{tree}:file &&\n'> <'\tgit branch three &&\n'> 
            <'\n'> <'\techo master >> file &&\n'> <'\tgit commit -a -m Master &&\n'> 
            <'\tgit tag -a -m "Tag Master" tag-master &&\n'> <'\n'> <'\tgit checkout three &&\n'> <'\n'> <'\tgit clone . cloned &&\n'> <'\tcd cloned &&\n'> 
            <'\tgit config remote.origin.url ../.git/ &&\n'> <'\n'> <'\tgit config remote.config-explicit.url ../.git/ &&\n'> 
            <'\tgit config remote.config-explicit.fetch refs/heads/master:remotes/rem/master &&\n'> <'\tgit config --add remote.config-explicit.fetch refs/heads/one:remotes/rem/one &&\n'> 
            <'\tgit config --add remote.config-explicit.fetch two:remotes/rem/two &&\n'> <'\tgit config --add remote.config-explicit.fetch refs/heads/three:remotes/rem/three &&\n'> 
            <'\tremotes="config-explicit" &&\n'> <'\n'> <'\tgit config remote.config-glob.url ../.git/ &&\n'> 
            <'\tgit config remote.config-glob.fetch refs/heads/*:refs/remotes/rem/* &&\n'> <'\tremotes="$remotes config-glob" &&\n'> <'\n'> <'\tmkdir -p .git/remotes &&\n'> <'\t{\n'> 
            <'\t\techo "URL: ../.git/"\n'> <'\t\techo "Pull: refs/heads/master:remotes/rem/master"\n'> 
            <'\t\techo "Pull: refs/heads/one:remotes/rem/one"\n'> <'\t\techo "Pull: two:remotes/rem/two"\n'> <'\t\techo "Pull: refs/heads/three:remotes/rem/three"\n'> 
            <'\t} >.git/remotes/remote-explicit &&\n'> <'\tremotes="$remotes remote-explicit" &&\n'> <'\n'> <'\t{\n'> <'\t\techo "URL: ../.git/"\n'> 
            <'\t\techo "Pull: refs/heads/*:refs/remotes/rem/*"\n'> <'\t} >.git/remotes/remote-glob &&\n'> <'\tremotes="$remotes remote-glob" &&\n'> <'\n'> 
            <'\tmkdir -p .git/branches &&\n'> <'\techo "../.git" > .git/branches/branches-default &&\n'> 
            <'\tremotes="$remotes branches-default" &&\n'> <'\n'> <'\techo "../.git#one" > .git/branches/branches-one &&\n'> 
            <'\tremotes="$remotes branches-one" &&\n'> <'\n'> <'\tfor remote in $remotes ; do\n'> <'\t\tgit config branch.br-$remote.remote $remote &&\n'> 
            <'\t\tgit config branch.br-$remote-merge.remote $remote &&\n'> <'\t\tgit config branch.br-$remote-merge.merge refs/heads/three &&\n'> 
            <'\t\tgit config branch.br-$remote-octopus.remote $remote &&\n'> <'\t\tgit config branch.br-$remote-octopus.merge refs/heads/one &&\n'> 
            <'\t\tgit config --add branch.br-$remote-octopus.merge two\n'> <'\tdone\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [remote]
      iterable: (for_iter.Words words:[{($ Id.VSub_DollarName remotes)}])
      semi_tok: <Id.Op_Semi _>
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [branch]
              iterable: (for_iter.Words words:[{(DQ )} {(DQ <-merge>)} {(DQ <-octopus>)}])
              semi_tok: <Id.Op_Semi _>
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Simple
                      blame_tok: <cat>
                      more_env: []
                      words: [{<cat>}]
                      redirects: [
                        (Redir
                          op: <Id.Redir_DLess '<<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: 
                            (redir_param.HereDoc
                              here_begin: {<EOF>}
                              here_end_tok: <Id.Undefined_Tok ''>
                              stdin_parts: [
                                <br->
                                ($ Id.VSub_DollarName remote)
                                ($ Id.VSub_DollarName branch)
                                <'\n'>
                                <br->
                                ($ Id.VSub_DollarName remote)
                                ($ Id.VSub_DollarName branch)
                                <' '>
                                ($ Id.VSub_DollarName remote)
                                <'\n'>
                              ]
                            )
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<tests>})]
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [branch]
      iterable: (for_iter.Words words:[{<master>} {<br-unconfig>}])
      semi_tok: <Id.Op_Semi _>
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {($ Id.VSub_DollarName branch)}]
              redirects: []
              do_fork: T
            )
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [remote]
              iterable: (for_iter.Words words:[{($ Id.VSub_DollarName remotes)}])
              semi_tok: <Id.Op_Semi _>
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {($ Id.VSub_DollarName branch)} {($ Id.VSub_DollarName remote)}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: [(Redir op:<Id.Redir_DGreat '>>'> loc:(redir_loc.Fd fd:1) arg:{<tests>})]
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [branch]
      iterable: (for_iter.Words words:[{<master>} {<br-unconfig>}])
      semi_tok: <Id.Op_Semi _>
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <cat>
              more_env: []
              words: [{<cat>}]
              redirects: [
                (Redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_tok: <Id.Undefined_Tok ''>
                      stdin_parts: [
                        ($ Id.VSub_DollarName branch)
                        <' ../.git\n'>
                        ($ Id.VSub_DollarName branch)
                        <' ../.git one\n'>
                        ($ Id.VSub_DollarName branch)
                        <' ../.git one two\n'>
                        ($ Id.VSub_DollarName branch)
                        <' --tags ../.git\n'>
                        ($ Id.VSub_DollarName branch)
                        <' ../.git tag tag-one tag tag-three\n'>
                        ($ Id.VSub_DollarName branch)
                        <' ../.git tag tag-one-tree tag tag-three-file\n'>
                        ($ Id.VSub_DollarName branch)
                        <' ../.git one tag tag-one tag tag-three-file\n'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: [(Redir op:<Id.Redir_DGreat '>>'> loc:(redir_loc.Fd fd:1) arg:{<tests>})]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Simple
              blame_tok: <read>
              more_env: []
              words: [{<read>} {<cmd>}]
              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_DollarName cmd))})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <Id.Left_SingleQuote '\''>
                  pattern: (pat.Words words:[{(SQ )} {(SQ <'#'>) <Id.Lit_Star '*'>}])
                  middle: <Id.Right_CasePat _>
                  action: [(command.ControlFlow keyword:<Id.ControlFlow_Continue continue>)]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'test='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'test='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test='> name:test)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (command.Simple
                                blame_tok: <echo>
                                more_env: []
                                words: [{<echo>} {(DQ ($ Id.VSub_DollarName cmd))}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <sed>
                                more_env: []
                                words: [{<sed>} {<-e>} {(SQ <'s|[/ ][/ ]*|_|g'>)}]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_Pipe _>]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'pfx='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'pfx='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pfx='> name:pfx)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <printf>
                            more_env: []
                            words: [{<printf>} {(DQ <'%04d'>)} {($ Id.VSub_DollarName test_count)}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'expect_f='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'expect_f='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'expect_f='> name:expect_f)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ ($ Id.VSub_DollarName TEST_DIRECTORY) <'/t5515/fetch.'> 
                        ($ Id.VSub_DollarName test)
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'actual_f='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'actual_f='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'actual_f='> name:actual_f)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName pfx) <-fetch.> ($ Id.VSub_DollarName test))}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'expect_r='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'expect_r='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'expect_r='> name:expect_r)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ ($ Id.VSub_DollarName TEST_DIRECTORY) <'/t5515/refs.'> 
                        ($ Id.VSub_DollarName test)
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'actual_r='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'actual_r='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'actual_r='> name:actual_r)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName pfx) <-refs.> ($ Id.VSub_DollarName test))}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <test_expect_success>
              more_env: []
              words: [
                {<test_expect_success>}
                {(DQ ($ Id.VSub_DollarName cmd))}
                {
                  (SQ <'\n'> <'\t\t{\n'> <'\t\t\techo "# $cmd"\n'> <'\t\t\tset x $cmd; shift\n'> 
                    <'\t\t\tgit symbolic-ref HEAD refs/heads/$1 ; shift\n'> <'\t\t\trm -f .git/FETCH_HEAD\n'> <'\t\t\tgit for-each-ref \\\n'> 
                    <'\t\t\t\trefs/heads refs/remotes/rem refs/tags |\n'> <'\t\t\twhile read val type refname\n'> <'\t\t\tdo\n'> 
                    <'\t\t\t\tgit update-ref -d "$refname" "$val"\n'> <'\t\t\tdone\n'> <'\t\t\tgit fetch "$@" >/dev/null\n'> <'\t\t\tcat .git/FETCH_HEAD\n'> 
                    <'\t\t} >"$actual_f" &&\n'> <'\t\tgit show-ref >"$actual_r" &&\n'> <'\t\tif test -f "$expect_f"\n'> <'\t\tthen\n'> 
                    <'\t\t\ttest_cmp "$expect_f" "$actual_f" &&\n'> <'\t\t\trm -f "$actual_f"\n'> <'\t\telse\n'> <'\t\t\t# this is to help developing new tests.\n'> 
                    <'\t\t\tcp "$actual_f" "$expect_f"\n'> <'\t\t\tfalse\n'> <'\t\tfi &&\n'> <'\t\tif test -f "$expect_r"\n'> <'\t\tthen\n'> 
                    <'\t\t\ttest_cmp "$expect_r" "$actual_r" &&\n'> <'\t\t\trm -f "$actual_r"\n'> <'\t\telse\n'> <'\t\t\t# this is to help developing new tests.\n'> 
                    <'\t\t\tcp "$actual_r" "$expect_r"\n'> <'\t\t\tfalse\n'> <'\t\tfi\n'> <'\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: [(Redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<tests>})]
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)