(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description) op: Equal rhs: {(SQ <'fetch --all works correctly'>)} ) ] ) (C {(.)} {(./test-lib.sh)}) (command.FuncDef name: setup_repository body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(mkdir)} {(DQ ($ VSub_Number '$1'))}) (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [ Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp ] children: [ (C {(cd)} {(DQ ($ VSub_Number '$1'))}) (C {(git)} {(init)}) (command.SimpleCommand redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(file)} ) ] ) (C {(git)} {(add)} {(file)}) (C {(test_tick)}) (C {(git)} {(commit)} {(-m)} {(DQ (Initial))}) (C {(git)} {(checkout)} {(-b)} {(side)}) (command.SimpleCommand redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(KW_Elif elif)} ) ] ) (C {(git)} {(add)} {(KW_Elif elif)}) (C {(test_tick)}) (C {(git)} {(commit)} {(-m)} {(DQ (Second))}) (C {(git)} {(checkout)} {(master)}) ] ) ] ) ) ] ) ] ) ) (C {(test_expect_success)} {(setup)} { (SQ <'\n'> <'\tsetup_repository one &&\n'> <'\tsetup_repository two &&\n'> <'\t(\n'> <'\t\tcd two && git branch another\n'> <'\t) &&\n'> <'\tgit clone --mirror two three &&\n'> <'\tgit clone one test\n'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test/expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 177 stdin_parts: [ (' one/master\n') (' one/side\n') (' origin/HEAD -> origin/master\n') (' origin/master\n') (' origin/side\n') (' three/another\n') (' three/master\n') (' three/side\n') (' two/another\n') (' two/master\n') (' two/side\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'git fetch --all'>)} { (SQ <'\n'> <'\t(cd test &&\n'> <'\t git remote add one ../one &&\n'> <'\t git remote add two ../two &&\n'> <'\t git remote add three ../three &&\n'> <'\t git fetch --all &&\n'> <'\t git branch -r > output &&\n'> <'\t test_cmp expect output)\n'> ) } ) (C {(test_expect_success)} {(SQ <'git fetch --all should continue if a remote has errors'>)} { (SQ <'\n'> <'\t(git clone one test2 &&\n'> <'\t cd test2 &&\n'> <'\t git remote add bad ../non-existing &&\n'> <'\t git remote add one ../one &&\n'> <'\t git remote add two ../two &&\n'> <'\t git remote add three ../three &&\n'> <'\t test_must_fail git fetch --all &&\n'> <'\t git branch -r > output &&\n'> <'\t test_cmp ../test/expect output)\n'> ) } ) (C {(test_expect_success)} {(SQ <'git fetch --all does not allow non-option arguments'>)} { (SQ <'\n'> <'\t(cd test &&\n'> <'\t test_must_fail git fetch --all origin &&\n'> <'\t test_must_fail git fetch --all origin master)\n'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 248 stdin_parts: [ (' origin/HEAD -> origin/master\n') (' origin/master\n') (' origin/side\n') (' three/another\n') (' three/master\n') (' three/side\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'git fetch --multiple (but only one remote)'>)} { (SQ <'\n'> <'\t(git clone one test3 &&\n'> <'\t cd test3 &&\n'> <'\t git remote add three ../three &&\n'> <'\t git fetch --multiple three &&\n'> <'\t git branch -r > output &&\n'> <'\t test_cmp ../expect output)\n'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 283 stdin_parts: [ (' one/master\n') (' one/side\n') (' two/another\n') (' two/master\n') (' two/side\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'git fetch --multiple (two remotes)'>)} { (SQ <'\n'> <'\t(git clone one test4 &&\n'> <'\t cd test4 &&\n'> <'\t git remote rm origin &&\n'> <'\t git remote add one ../one &&\n'> <'\t git remote add two ../two &&\n'> <'\t git fetch --multiple one two &&\n'> <'\t git branch -r > output &&\n'> <'\t test_cmp ../expect output)\n'> ) } ) (C {(test_expect_success)} {(SQ <'git fetch --multiple (bad remote names)'>)} {(SQ <'\n'> <'\t(cd test4 &&\n'> <'\t test_must_fail git fetch --multiple four)\n'>)} ) (C {(test_expect_success)} {(SQ <'git fetch --all (skipFetchAll)'>)} { (SQ <'\n'> <'\t(cd test4 &&\n'> <'\t for b in $(git branch -r)\n'> <'\t do\n'> <'\t\tgit branch -r -d $b || exit 1\n'> <'\t done &&\n'> <'\t git remote add three ../three &&\n'> <'\t git config remote.three.skipFetchAll true &&\n'> <'\t git fetch --all &&\n'> <'\t git branch -r > output &&\n'> <'\t test_cmp ../expect output)\n'> ) } ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 358 stdin_parts: [ (' one/master\n') (' one/side\n') (' three/another\n') (' three/master\n') (' three/side\n') (' two/another\n') (' two/master\n') (' two/side\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'git fetch --multiple (ignoring skipFetchAll)'>)} { (SQ <'\n'> <'\t(cd test4 &&\n'> <'\t for b in $(git branch -r)\n'> <'\t do\n'> <'\t\tgit branch -r -d $b || exit 1\n'> <'\t done &&\n'> <'\t git fetch --multiple one two three &&\n'> <'\t git branch -r > output &&\n'> <'\t test_cmp ../expect output)\n'> ) } ) (C {(test_expect_success)} {(SQ <'git fetch --all --no-tags'>)} { (SQ <'\n'> <'\t>expect &&\n'> <'\tgit clone one test5 &&\n'> <'\tgit clone test5 test6 &&\n'> <'\t(cd test5 && git tag test-tag) &&\n'> <'\t(\n'> <'\t\tcd test6 &&\n'> <'\t\tgit fetch --all --no-tags &&\n'> <'\t\tgit tag >output\n'> <'\t) &&\n'> <'\ttest_cmp expect test6/output\n'> ) } ) (C {(test_expect_success)} {(SQ <'git fetch --all --tags'>)} { (SQ <'\n'> <'\techo test-tag >expect &&\n'> <'\tgit clone one test7 &&\n'> <'\tgit clone test7 test8 &&\n'> <'\t(\n'> <'\t\tcd test7 &&\n'> <'\t\ttest_commit test-tag &&\n'> <'\t\tgit reset --hard HEAD^\n'> <'\t) &&\n'> <'\t(\n'> <'\t\tcd test8 &&\n'> <'\t\tgit fetch --all --tags &&\n'> <'\t\tgit tag >output\n'> <'\t) &&\n'> <'\ttest_cmp expect test8/output\n'> ) } ) (C {(test_done)}) ] )