(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'tagopt variable affects "git fetch" and is overridden by commandline.'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: setup_clone
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (C {(git)} {(clone)} {(--mirror)} {(.)} {($ VSub_Number '$1')})
                (C {(git)} {(remote)} {(add)} {(remote_) ($ VSub_Number '$1')} {($ VSub_Number '$1')})
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Op_DAmp Op_DAmp]
                          children: [
                            (C {(cd)} {($ VSub_Number '$1')})
                            (C {(git)} {(tag)} {(tag_) ($ VSub_Number '$1')})
                            (C {(git)} {(branch)} {(branch_) ($ VSub_Number '$1')})
                          ]
                        )
                      ]
                    )
                )
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ <'\n'> <'\ttest_commit test &&\n'> <'\tsetup_clone one &&\n'> 
          <'\tgit config remote.remote_one.tagopt --no-tags &&\n'> <'\tsetup_clone two &&\n'> <'\tgit config remote.remote_two.tagopt --tags\n'> <'\t'>
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('fetch with tagopt=--no-tags does not get tag'))} 
      {
        (SQ <'\n'> <'\tgit fetch remote_one &&\n'> <'\ttest_must_fail git show-ref tag_one &&\n'> 
          <'\tgit show-ref remote_one/branch_one\n'> <'\t'>
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('fetch --tags with tagopt=--no-tags gets tag'))} 
      {
        (SQ <'\n'> <'\t(\n'> <'\t\tcd one &&\n'> <'\t\tgit branch second_branch_one\n'> <'\t) &&\n'> 
          <'\tgit fetch --tags remote_one &&\n'> <'\tgit show-ref tag_one &&\n'> <'\tgit show-ref remote_one/second_branch_one\n'> <'\t'>
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('fetch --no-tags with tagopt=--tags does not get tag'))} 
      {
        (SQ <'\n'> <'\tgit fetch --no-tags remote_two &&\n'> 
          <'\ttest_must_fail git show-ref tag_two &&\n'> <'\tgit show-ref remote_two/branch_two\n'> <'\t'>
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('fetch with tagopt=--tags gets tag'))} 
      {
        (SQ <'\n'> <'\t(\n'> <'\t\tcd two &&\n'> <'\t\tgit branch second_branch_two\n'> <'\t) &&\n'> 
          <'\tgit fetch remote_two &&\n'> <'\tgit show-ref tag_two &&\n'> <'\tgit show-ref remote_two/second_branch_two\n'> <'\t'>
        )
      }
    )
    (C {(test_done)})
  ]
)