(command.CommandList children: [ (command.ShFunction name: test_proto body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:desc) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [24] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:proto) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [28] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:url) op: assign_op.Equal rhs: {($ Id.VSub_Number '$3')} spids: [32] ) ] ) (C {<test_expect_success>} {(DQ <'clone '> ($ Id.VSub_Number '$1') <' (enabled)'>)} { (SQ <'\n'> <'\t\trm -rf tmp.git &&\n'> <'\t\t(\n'> <'\t\t\tGIT_ALLOW_PROTOCOL=$proto &&\n'> <'\t\t\texport GIT_ALLOW_PROTOCOL &&\n'> <'\t\t\tgit clone --bare "$url" tmp.git\n'> <'\t\t)\n'> <'\t'> ) } ) (C {<test_expect_success>} {(DQ <'fetch '> ($ Id.VSub_Number '$1') <' (enabled)'>)} { (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd tmp.git &&\n'> <'\t\t\tGIT_ALLOW_PROTOCOL=$proto &&\n'> <'\t\t\texport GIT_ALLOW_PROTOCOL &&\n'> <'\t\t\tgit fetch\n'> <'\t\t)\n'> <'\t'> ) } ) (C {<test_expect_success>} {(DQ <'push '> ($ Id.VSub_Number '$1') <' (enabled)'>)} { (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd tmp.git &&\n'> <'\t\t\tGIT_ALLOW_PROTOCOL=$proto &&\n'> <'\t\t\texport GIT_ALLOW_PROTOCOL &&\n'> <'\t\t\tgit push origin HEAD:pushed\n'> <'\t\t)\n'> <'\t'> ) } ) (C {<test_expect_success>} {(DQ <'push '> ($ Id.VSub_Number '$1') <' (disabled)'>)} { (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd tmp.git &&\n'> <'\t\t\tGIT_ALLOW_PROTOCOL=none &&\n'> <'\t\t\texport GIT_ALLOW_PROTOCOL &&\n'> <'\t\t\ttest_must_fail git push origin HEAD:pushed\n'> <'\t\t)\n'> <'\t'> ) } ) (C {<test_expect_success>} {(DQ <'fetch '> ($ Id.VSub_Number '$1') <' (disabled)'>)} { (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd tmp.git &&\n'> <'\t\t\tGIT_ALLOW_PROTOCOL=none &&\n'> <'\t\t\texport GIT_ALLOW_PROTOCOL &&\n'> <'\t\t\ttest_must_fail git fetch\n'> <'\t\t)\n'> <'\t'> ) } ) (C {<test_expect_success>} {(DQ <'clone '> ($ Id.VSub_Number '$1') <' (disabled)'>)} { (SQ <'\n'> <'\t\trm -rf tmp.git &&\n'> <'\t\t(\n'> <'\t\t\tGIT_ALLOW_PROTOCOL=none &&\n'> <'\t\t\texport GIT_ALLOW_PROTOCOL &&\n'> <'\t\t\ttest_must_fail git clone --bare "$url" tmp.git\n'> <'\t\t)\n'> <'\t'> ) } ) ] ) ) (command.ShFunction name: setup_ssh_wrapper body: (BraceGroup children: [ (C {<test_expect_success>} {(SQ <'setup ssh wrapper'>)} { (SQ <'\n'> <'\t\twrite_script ssh-wrapper <<-\\EOF &&\n'> <'\t\techo >&2 "ssh: $*"\n'> <'\t\thost=$1; shift\n'> <'\t\tcd "$TRASH_DIRECTORY/$host" &&\n'> <'\t\teval "$*"\n'> <'\t\tEOF\n'> <'\t\tGIT_SSH="$PWD/ssh-wrapper" &&\n'> <'\t\texport GIT_SSH &&\n'> <'\t\texport TRASH_DIRECTORY\n'> <'\t'> ) } ) ] ) ) (command.ShFunction name: setup_ext_wrapper body: (BraceGroup children: [ (C {<test_expect_success>} {(SQ <'setup ext wrapper'>)} { (SQ <'\n'> <'\t\twrite_script fake-remote <<-\\EOF &&\n'> <'\t\techo >&2 "fake-remote: $*"\n'> <'\t\tcd "$TRASH_DIRECTORY/remote" &&\n'> <'\t\teval "$*"\n'> <'\t\tEOF\n'> <'\t\tPATH=$TRASH_DIRECTORY:$PATH &&\n'> <'\t\texport TRASH_DIRECTORY\n'> <'\t'> ) } ) ] ) ) ] )