(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: 
            {
              (SQ 
                (Token
                  id: Id.Lit_Chars
                  val: 'tagopt variable affects "git fetch" and is overridden by commandline.'
                  span_id: 6
                )
              )
            }
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.ShFunction
      name: setup_clone
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {(git)} {(clone)} {(--mirror)} {(.)} {($ Id.VSub_Number '$1')})
                (C {(git)} {(remote)} {(add)} {(remote_) ($ Id.VSub_Number '$1')} 
                  {($ Id.VSub_Number '$1')}
                )
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DAmp Id.Op_DAmp]
                          children: [
                            (C {(cd)} {($ Id.VSub_Number '$1')})
                            (C {(git)} {(tag)} {(tag_) ($ Id.VSub_Number '$1')})
                            (C {(git)} {(branch)} {(branch_) ($ Id.VSub_Number '$1')})
                          ]
                        )
                      ]
                    )
                )
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:84) 
          (Token id:Id.Lit_Chars val:'\ttest_commit test &&\n' span_id:85) (Token id:Id.Lit_Chars val:'\tsetup_clone one &&\n' span_id:86) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config remote.remote_one.tagopt --no-tags &&\n'
            span_id: 87
          ) (Token id:Id.Lit_Chars val:'\tsetup_clone two &&\n' span_id:88) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config remote.remote_two.tagopt --tags\n'
            span_id: 89
          ) (Token id:Id.Lit_Chars val:'\t' span_id:90)
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('fetch with tagopt=--no-tags does not get tag'))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:101) 
          (Token id:Id.Lit_Chars val:'\tgit fetch remote_one &&\n' span_id:102) (Token id:Id.Lit_Chars val:'\ttest_must_fail git show-ref tag_one &&\n' span_id:103) 
          (Token id:Id.Lit_Chars val:'\tgit show-ref remote_one/branch_one\n' span_id:104) (Token id:Id.Lit_Chars val:'\t' span_id:105)
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('fetch --tags with tagopt=--no-tags gets tag'))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:116) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:117) (Token id:Id.Lit_Chars val:'\t\tcd one &&\n' span_id:118) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch second_branch_one\n' span_id:119) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:120) 
          (Token id:Id.Lit_Chars val:'\tgit fetch --tags remote_one &&\n' span_id:121) (Token id:Id.Lit_Chars val:'\tgit show-ref tag_one &&\n' span_id:122) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit show-ref remote_one/second_branch_one\n'
            span_id: 123
          ) (Token id:Id.Lit_Chars val:'\t' span_id:124)
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('fetch --no-tags with tagopt=--tags does not get tag'))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:135) 
          (Token id:Id.Lit_Chars val:'\tgit fetch --no-tags remote_two &&\n' span_id:136) (Token id:Id.Lit_Chars val:'\ttest_must_fail git show-ref tag_two &&\n' span_id:137) 
          (Token id:Id.Lit_Chars val:'\tgit show-ref remote_two/branch_two\n' span_id:138) (Token id:Id.Lit_Chars val:'\t' span_id:139)
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('fetch with tagopt=--tags gets tag'))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:150) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:151) (Token id:Id.Lit_Chars val:'\t\tcd two &&\n' span_id:152) 
          (Token id:Id.Lit_Chars val:'\t\tgit branch second_branch_two\n' span_id:153) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:154) 
          (Token id:Id.Lit_Chars val:'\tgit fetch remote_two &&\n' span_id:155) (Token id:Id.Lit_Chars val:'\tgit show-ref tag_two &&\n' span_id:156) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit show-ref remote_two/second_branch_two\n'
            span_id: 157
          ) (Token id:Id.Lit_Chars val:'\t' span_id:158)
        )
      }
    )
    (C {(test_done)})
  ]
)