(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'fetch --all works correctly'>)} spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShFunction name: setup_repository body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<mkdir>} {(DQ ($ Id.VSub_Number '$1'))}) (command.Subshell child: (command.AndOr ops: [ Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp ] children: [ (C {<cd>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<git>} {<init>}) (command.Simple redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<file>} ) ] do_fork: F ) (C {<git>} {<add>} {<file>}) (C {<test_tick>}) (C {<git>} {<commit>} {<-m>} {(DQ <Initial>)}) (C {<git>} {<checkout>} {<-b>} {<side>}) (command.Simple redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<Id.KW_Elif elif>} ) ] do_fork: F ) (C {<git>} {<add>} {<Id.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.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'test/expect'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'> ] ) ) ] do_fork: T ) (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.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'> ] ) ) ] do_fork: T ) (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.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'> ] ) ) ] do_fork: T ) (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.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'> ] ) ) ] do_fork: T ) (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>}) ] )