(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <"fetch --all works correctly">)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: setup_repository
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (C {(mkdir)} {(DQ ($ VSub_Number "$1"))})
                (Subshell
                  child: 
                    (AndOr
                      children: [
                        (C {(cd)} {(DQ ($ VSub_Number "$1"))})
                        (AndOr
                          children: [
                            (C {(git)} {(init)})
                            (AndOr
                              children: [
                                (SimpleCommand
                                  redirects: [
                                    (Redir
                                      op_id: Redir_Great
                                      fd: -1
                                      arg_word: {(file)}
                                      spids: [50]
                                    )
                                  ]
                                )
                                (AndOr
                                  children: [
                                    (C {(git)} {(add)} {(file)})
                                    (AndOr
                                      children: [
                                        (C {(test_tick)})
                                        (AndOr
                                          children: [
                                            (C {(git)} {(commit)} {(-m)} {(DQ (Initial))})
                                            (AndOr
                                              children: [
                                                (C {(git)} {(checkout)} {(-b)} {(side)})
                                                (AndOr
                                                  children: [
                                                    (SimpleCommand
                                                      redirects: [
                                                        (Redir
                                                          op_id: Redir_Great
                                                          fd: -1
                                                          arg_word: {(KW_Elif elif)}
                                                          spids: [94]
                                                        )
                                                      ]
                                                    )
                                                    (AndOr
                                                      children: [
                                                        (C {(git)} {(add)} {(KW_Elif elif)})
                                                        (AndOr
                                                          children: [
                                                            (C {(test_tick)})
                                                            (AndOr
                                                              children: [
                                                                (C {(git)} {(commit)} {(-m)} 
                                                                  {(DQ (Second))}
                                                                )
                                                                (C {(git)} {(checkout)} {(master)})
                                                              ]
                                                              op_id: Op_DAmp
                                                            )
                                                          ]
                                                          op_id: Op_DAmp
                                                        )
                                                      ]
                                                      op_id: Op_DAmp
                                                    )
                                                  ]
                                                  op_id: Op_DAmp
                                                )
                                              ]
                                              op_id: Op_DAmp
                                            )
                                          ]
                                          op_id: Op_DAmp
                                        )
                                      ]
                                      op_id: Op_DAmp
                                    )
                                  ]
                                  op_id: Op_DAmp
                                )
                              ]
                              op_id: Op_DAmp
                            )
                          ]
                          op_id: Op_DAmp
                        )
                      ]
                      op_id: Op_DAmp
                    )
                  spids: [31 134]
                )
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [20]
        )
      spids: [15 19]
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ <"\n"> <"\tsetup_repository one &&\n"> <"\tsetup_repository two &&\n"> <"\t(\n"> 
          <"\t\tcd two && git branch another\n"> <"\t) &&\n"> <"\tgit clone --mirror two three &&\n"> <"\tgit clone one test\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(test/expect)} spids:[157])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("  one/master\n") ("  one/side\n") ("  origin/HEAD -> origin/master\n") 
                ("  origin/master\n") ("  origin/side\n") ("  three/another\n") ("  three/master\n") ("  three/side\n") ("  two/another\n") 
                ("  two/master\n") ("  two/side\n")
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [161]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git fetch --all">)} 
      {
        (SQ <"\n"> <"\t(cd test &&\n"> <"\t git remote add one ../one &&\n"> 
          <"\t git remote add two ../two &&\n"> <"\t git remote add three ../three &&\n"> <"\t git fetch --all &&\n"> 
          <"\t git branch -r > output &&\n"> <"\t test_cmp expect output)\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git fetch --all should continue if a remote has errors">)} 
      {
        (SQ <"\n"> <"\t(git clone one test2 &&\n"> <"\t cd test2 &&\n"> 
          <"\t git remote add bad ../non-existing &&\n"> <"\t git remote add one ../one &&\n"> <"\t git remote add two ../two &&\n"> 
          <"\t git remote add three ../three &&\n"> <"\t test_must_fail git fetch --all &&\n"> <"\t git branch -r > output &&\n"> 
          <"\t test_cmp ../test/expect output)\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git fetch --all does not allow non-option arguments">)} 
      {
        (SQ <"\n"> <"\t(cd test &&\n"> <"\t test_must_fail git fetch --all origin &&\n"> 
          <"\t test_must_fail git fetch --all origin master)\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[231])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("  origin/HEAD -> origin/master\n") ("  origin/master\n") ("  origin/side\n") 
                ("  three/another\n") ("  three/master\n") ("  three/side\n")
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [235]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git fetch --multiple (but only one remote)">)} 
      {
        (SQ <"\n"> <"\t(git clone one test3 &&\n"> <"\t cd test3 &&\n"> 
          <"\t git remote add three ../three &&\n"> <"\t git fetch --multiple three &&\n"> <"\t git branch -r > output &&\n"> 
          <"\t test_cmp ../expect output)\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[265])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("  one/master\n") ("  one/side\n") ("  two/another\n") ("  two/master\n") 
                ("  two/side\n")
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [269]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git fetch --multiple (two remotes)">)} 
      {
        (SQ <"\n"> <"\t(git clone one test4 &&\n"> <"\t cd test4 &&\n"> <"\t git remote rm origin &&\n"> 
          <"\t git remote add one ../one &&\n"> <"\t git remote add two ../two &&\n"> <"\t git fetch --multiple one two &&\n"> 
          <"\t git branch -r > output &&\n"> <"\t test_cmp ../expect output)\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git fetch --multiple (bad remote names)">)} 
      {(SQ <"\n"> <"\t(cd test4 &&\n"> <"\t test_must_fail git fetch --multiple four)\n">)}
    )
    (C {(test_expect_success)} {(SQ <"git fetch --all (skipFetchAll)">)} 
      {
        (SQ <"\n"> <"\t(cd test4 &&\n"> <"\t for b in $(git branch -r)\n"> <"\t do\n"> 
          <"\t\tgit branch -r -d $b || exit 1\n"> <"\t done &&\n"> <"\t git remote add three ../three &&\n"> 
          <"\t git config remote.three.skipFetchAll true &&\n"> <"\t git fetch --all &&\n"> <"\t git branch -r > output &&\n"> <"\t test_cmp ../expect output)\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[335])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("  one/master\n") ("  one/side\n") ("  three/another\n") ("  three/master\n") 
                ("  three/side\n") ("  two/another\n") ("  two/master\n") ("  two/side\n")
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [339]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git fetch --multiple (ignoring skipFetchAll)">)} 
      {
        (SQ <"\n"> <"\t(cd test4 &&\n"> <"\t for b in $(git branch -r)\n"> <"\t do\n"> 
          <"\t\tgit branch -r -d $b || exit 1\n"> <"\t done &&\n"> <"\t git fetch --multiple one two three &&\n"> <"\t git branch -r > output &&\n"> 
          <"\t test_cmp ../expect output)\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git fetch --all --no-tags">)} 
      {
        (SQ <"\n"> <"\t>expect &&\n"> <"\tgit clone one test5 &&\n"> <"\tgit clone test5 test6 &&\n"> 
          <"\t(cd test5 && git tag test-tag) &&\n"> <"\t(\n"> <"\t\tcd test6 &&\n"> <"\t\tgit fetch --all --no-tags &&\n"> <"\t\tgit tag >output\n"> 
          <"\t) &&\n"> <"\ttest_cmp expect test6/output\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git fetch --all --tags">)} 
      {
        (SQ <"\n"> <"\techo test-tag >expect &&\n"> <"\tgit clone one test7 &&\n"> 
          <"\tgit clone test7 test8 &&\n"> <"\t(\n"> <"\t\tcd test7 &&\n"> <"\t\ttest_commit test-tag &&\n"> <"\t\tgit reset --hard HEAD^\n"> 
          <"\t) &&\n"> <"\t(\n"> <"\t\tcd test8 &&\n"> <"\t\tgit fetch --all --tags &&\n"> <"\t\tgit tag >output\n"> 
          <"\t) &&\n"> <"\ttest_cmp expect test8/output\n">
        )
      }
    )
    (C {(test_done)})
  ]
)