(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'Merge logic in fetch'>)} spids: [16] ) ] spids: [16] ) (C {(.)} {(./test-lib.sh)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:LF) op:Equal rhs:{(SQ <'\n'>)} spids:[27])] spids: [27] ) (C {(test_expect_success)} {(setup)} { (SQ <'\n'> <'\tGIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" &&\n'> <'\tGIT_COMMITTER_DATE="2006-06-26 00:00:00 +0000" &&\n'> <'\texport GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&\n'> <'\n'> <'\techo >file original &&\n'> <'\tgit add file &&\n'> <'\tgit commit -a -m One &&\n'> <'\tgit tag tag-one &&\n'> <'\tgit tag tag-one-tree HEAD^{tree} &&\n'> <'\tgit branch one &&\n'> <'\n'> <'\techo two >> file &&\n'> <'\tgit commit -a -m Two &&\n'> <'\tgit tag -a -m "Tag Two" tag-two &&\n'> <'\tgit branch two &&\n'> <'\n'> <'\techo three >> file &&\n'> <'\tgit commit -a -m Three &&\n'> <'\tgit tag -a -m "Tag Three" tag-three &&\n'> <'\tgit tag -a -m "Tag Three file" tag-three-file HEAD^{tree}:file &&\n'> <'\tgit branch three &&\n'> <'\n'> <'\techo master >> file &&\n'> <'\tgit commit -a -m Master &&\n'> <'\tgit tag -a -m "Tag Master" tag-master &&\n'> <'\n'> <'\tgit checkout three &&\n'> <'\n'> <'\tgit clone . cloned &&\n'> <'\tcd cloned &&\n'> <'\tgit config remote.origin.url ../.git/ &&\n'> <'\n'> <'\tgit config remote.config-explicit.url ../.git/ &&\n'> <'\tgit config remote.config-explicit.fetch refs/heads/master:remotes/rem/master &&\n'> <'\tgit config --add remote.config-explicit.fetch refs/heads/one:remotes/rem/one &&\n'> <'\tgit config --add remote.config-explicit.fetch two:remotes/rem/two &&\n'> <'\tgit config --add remote.config-explicit.fetch refs/heads/three:remotes/rem/three &&\n'> <'\tremotes="config-explicit" &&\n'> <'\n'> <'\tgit config remote.config-glob.url ../.git/ &&\n'> <'\tgit config remote.config-glob.fetch refs/heads/*:refs/remotes/rem/* &&\n'> <'\tremotes="$remotes config-glob" &&\n'> <'\n'> <'\tmkdir -p .git/remotes &&\n'> <'\t{\n'> <'\t\techo "URL: ../.git/"\n'> <'\t\techo "Pull: refs/heads/master:remotes/rem/master"\n'> <'\t\techo "Pull: refs/heads/one:remotes/rem/one"\n'> <'\t\techo "Pull: two:remotes/rem/two"\n'> <'\t\techo "Pull: refs/heads/three:remotes/rem/three"\n'> <'\t} >.git/remotes/remote-explicit &&\n'> <'\tremotes="$remotes remote-explicit" &&\n'> <'\n'> <'\t{\n'> <'\t\techo "URL: ../.git/"\n'> <'\t\techo "Pull: refs/heads/*:refs/remotes/rem/*"\n'> <'\t} >.git/remotes/remote-glob &&\n'> <'\tremotes="$remotes remote-glob" &&\n'> <'\n'> <'\tmkdir -p .git/branches &&\n'> <'\techo "../.git" > .git/branches/branches-default &&\n'> <'\tremotes="$remotes branches-default" &&\n'> <'\n'> <'\techo "../.git#one" > .git/branches/branches-one &&\n'> <'\tremotes="$remotes branches-one" &&\n'> <'\n'> <'\tfor remote in $remotes ; do\n'> <'\t\tgit config branch.br-$remote.remote $remote &&\n'> <'\t\tgit config branch.br-$remote-merge.remote $remote &&\n'> <'\t\tgit config branch.br-$remote-merge.merge refs/heads/three &&\n'> <'\t\tgit config branch.br-$remote-octopus.remote $remote &&\n'> <'\t\tgit config branch.br-$remote-octopus.merge refs/heads/one &&\n'> <'\t\tgit config --add branch.br-$remote-octopus.merge two\n'> <'\tdone\n'> ) } ) (ForEach iter_name: remote iter_words: [{($ VSub_Name '$remotes')}] do_arg_iter: False body: (DoGroup children: [ (ForEach iter_name: branch iter_words: [{(DQ )} {(DQ (-merge))} {(DQ (-octopus))}] do_arg_iter: False body: (DoGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ (br-) ($ VSub_Name '$remote') ($ VSub_Name '$branch') ('\n') (br-) ($ VSub_Name '$remote') ($ VSub_Name '$branch') (' ') ($ VSub_Name '$remote') ('\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [155] ) ] ) ] spids: [151 170] ) spids: [137 149] ) ] spids: [129 172] ) redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(tests)} spids:[174])] spids: [124 127] ) (ForEach iter_name: branch iter_words: [{(master)} {(br-unconfig)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {($ VSub_Name '$branch')}) (ForEach iter_name: remote iter_words: [{($ VSub_Name '$remotes')}] do_arg_iter: False body: (DoGroup children: [(C {(echo)} {($ VSub_Name '$branch')} {($ VSub_Name '$remote')})] spids: [221 231] ) spids: [216 219] ) ] spids: [203 233] ) redirects: [(Redir op_id:Redir_DGreat fd:16777215 arg_word:{(tests)} spids:[235])] spids: [196 201] ) (ForEach iter_name: branch iter_words: [{(master)} {(br-unconfig)}] do_arg_iter: False body: (DoGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ($ VSub_Name '$branch') (' ../.git\n') ($ VSub_Name '$branch') (' ../.git one\n') ($ VSub_Name '$branch') (' ../.git one two\n') ($ VSub_Name '$branch') (' --tags ../.git\n') ($ VSub_Name '$branch') (' ../.git tag tag-one tag tag-three\n') ($ VSub_Name '$branch') (' ../.git tag tag-one-tree tag tag-three-file\n') ($ VSub_Name '$branch') (' ../.git one tag tag-one tag tag-three-file\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [263] ) ] ) ] spids: [258 281] ) redirects: [(Redir op_id:Redir_DGreat fd:16777215 arg_word:{(tests)} spids:[283])] spids: [251 256] ) (While cond: [(C {(read)} {(cmd)})] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Name '$cmd'))} arms: [ (case_arm pat_list: [{(SQ )} {(SQ <'#'>) (Lit_Other '*')}] action: [(ControlFlow token:<ControlFlow_Continue continue>)] spids: [16777215 315 319 16777215] ) ] spids: [297 303 322] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$cmd'))}) (C {(sed)} {(-e)} {(SQ <'s|[/ ][/ ]*|_|g'>)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [326 342] ) } spids: [325] ) ] spids: [325] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pfx) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(printf)} {(DQ ('%04d'))} {($ VSub_Name '$test_count')})] ) left_token: <Left_CommandSub '$('> spids: [346 354] ) } spids: [345] ) ] spids: [345] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:expect_f) op: Equal rhs: {(DQ ($ VSub_Name '$TEST_DIRECTORY') (/t5515/fetch.) ($ VSub_Name '$test'))} spids: [357] ) ] spids: [357] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:actual_f) op: Equal rhs: {(DQ ($ VSub_Name '$pfx') (-fetch.) ($ VSub_Name '$test'))} spids: [365] ) ] spids: [365] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:expect_r) op: Equal rhs: {(DQ ($ VSub_Name '$TEST_DIRECTORY') (/t5515/refs.) ($ VSub_Name '$test'))} spids: [373] ) ] spids: [373] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:actual_r) op: Equal rhs: {(DQ ($ VSub_Name '$pfx') (-refs.) ($ VSub_Name '$test'))} spids: [381] ) ] spids: [381] ) (C {(test_expect_success)} {(DQ ($ VSub_Name '$cmd'))} { (SQ <'\n'> <'\t\t{\n'> <'\t\t\techo "# $cmd"\n'> <'\t\t\tset x $cmd; shift\n'> <'\t\t\tgit symbolic-ref HEAD refs/heads/$1 ; shift\n'> <'\t\t\trm -f .git/FETCH_HEAD\n'> <'\t\t\tgit for-each-ref \\\n'> <'\t\t\t\trefs/heads refs/remotes/rem refs/tags |\n'> <'\t\t\twhile read val type refname\n'> <'\t\t\tdo\n'> <'\t\t\t\tgit update-ref -d "$refname" "$val"\n'> <'\t\t\tdone\n'> <'\t\t\tgit fetch "$@" >/dev/null\n'> <'\t\t\tcat .git/FETCH_HEAD\n'> <'\t\t} >"$actual_f" &&\n'> <'\t\tgit show-ref >"$actual_r" &&\n'> <'\t\tif test -f "$expect_f"\n'> <'\t\tthen\n'> <'\t\t\ttest_cmp "$expect_f" "$actual_f" &&\n'> <'\t\t\trm -f "$actual_f"\n'> <'\t\telse\n'> <'\t\t\t# this is to help developing new tests.\n'> <'\t\t\tcp "$actual_f" "$expect_f"\n'> <'\t\t\tfalse\n'> <'\t\tfi &&\n'> <'\t\tif test -f "$expect_r"\n'> <'\t\tthen\n'> <'\t\t\ttest_cmp "$expect_r" "$actual_r" &&\n'> <'\t\t\trm -f "$actual_r"\n'> <'\t\telse\n'> <'\t\t\t# this is to help developing new tests.\n'> <'\t\t\tcp "$actual_r" "$expect_r"\n'> <'\t\t\tfalse\n'> <'\t\tfi\n'> <'\t'> ) } ) ] spids: [294 434] ) redirects: [(Redir op_id:Redir_Less fd:16777215 arg_word:{(tests)} spids:[436])] ) (C {(test_done)}) ] )