(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"tagopt variable affects \"git fetch\" and is overridden by commandline.">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (FuncDef name: setup_clone body: (BraceGroup children: [ (AndOr children: [ (C {(git)} {(clone)} {(--mirror)} {(.)} {($ VSub_Number "$1")}) (AndOr children: [ (C {(git)} {(remote)} {(add)} {(remote_) ($ VSub_Number "$1")} {($ VSub_Number "$1")}) (Subshell child: (AndOr children: [ (C {(cd)} {($ VSub_Number "$1")}) (AndOr children: [ (C {(git)} {(tag)} {(tag_) ($ VSub_Number "$1")}) (C {(git)} {(branch)} {(branch_) ($ VSub_Number "$1")}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) spids: [50 74] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [20] ) spids: [15 19] ) (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)}) ] )