(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'tagopt variable affects "git fetch" and is overridden by commandline.'>)} spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShFunction name: setup_clone body: (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 child: (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 <'\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>}) ] )