Git fork

proc-receive hook tests: use "test_hook" instead of "write_script"

Change the t5411/*.sh tests to use the test_hook helper instead of
"write_script". Unfortunately these tests do the setup and test across
different test_expect_success blocks, so we have to use
--clobber (implying --setup) for these.

Let's change those that can use a quoted here-doc to do so while we're
at it.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Ævar Arnfjörð Bjarmason and committed by
Junio C Hamano
c39176b1 66865d12

+67 -67
+1 -1
t/t5411/once-0010-report-status-v1.sh
··· 3 3 ' 4 4 5 5 test_expect_success "setup proc-receive hook" ' 6 - write_script "$upstream/hooks/proc-receive" <<-EOF 6 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 7 7 printf >&2 "# proc-receive hook\n" 8 8 test-tool proc-receive -v \ 9 9 -r "ok refs/for/main/topic1" \
+2 -2
t/t5411/test-0002-pre-receive-declined.sh
··· 1 1 test_expect_success "setup pre-receive hook ($PROTOCOL)" ' 2 2 mv "$upstream/hooks/pre-receive" "$upstream/hooks/pre-receive.ok" && 3 - write_script "$upstream/hooks/pre-receive" <<-EOF 3 + test_hook -C "$upstream" --clobber pre-receive <<-\EOF 4 4 exit 1 5 5 EOF 6 6 ' ··· 21 21 EOF 22 22 test_cmp expect actual && 23 23 24 - test_cmp_refs -C "$upstream" <<-EOF 24 + test_cmp_refs -C "$upstream" <<-\EOF 25 25 <COMMIT-A> refs/heads/main 26 26 EOF 27 27 '
+1 -1
t/t5411/test-0003-pre-receive-declined--porcelain.sh
··· 1 1 test_expect_success "setup pre-receive hook ($PROTOCOL/porcelain)" ' 2 2 mv "$upstream/hooks/pre-receive" "$upstream/hooks/pre-receive.ok" && 3 - write_script "$upstream/hooks/pre-receive" <<-EOF 3 + test_hook -C "$upstream" --clobber pre-receive <<-\EOF 4 4 exit 1 5 5 EOF 6 6 '
+10 -10
t/t5411/test-0013-bad-protocol.sh
··· 1 1 test_expect_success "setup proc-receive hook (unknown version, $PROTOCOL)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v --version 2 5 5 EOF ··· 40 40 ' 41 41 42 42 test_expect_success "setup proc-receive hook (hook --die-read-version, $PROTOCOL)" ' 43 - write_script "$upstream/hooks/proc-receive" <<-EOF 43 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 44 44 printf >&2 "# proc-receive hook\n" 45 45 test-tool proc-receive -v --die-read-version 46 46 EOF ··· 65 65 grep "remote: fatal: die with the --die-read-version option" out-$test_count && 66 66 grep "remote: error: fail to negotiate version with proc-receive hook" out-$test_count && 67 67 68 - test_cmp_refs -C "$upstream" <<-EOF 68 + test_cmp_refs -C "$upstream" <<-\EOF 69 69 <COMMIT-A> refs/heads/main 70 70 EOF 71 71 ' 72 72 73 73 test_expect_success "setup proc-receive hook (hook --die-write-version, $PROTOCOL)" ' 74 - write_script "$upstream/hooks/proc-receive" <<-EOF 74 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 75 75 printf >&2 "# proc-receive hook\n" 76 76 test-tool proc-receive -v --die-write-version 77 77 EOF ··· 102 102 ' 103 103 104 104 test_expect_success "setup proc-receive hook (hook --die-read-commands, $PROTOCOL)" ' 105 - write_script "$upstream/hooks/proc-receive" <<-EOF 105 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 106 106 printf >&2 "# proc-receive hook\n" 107 107 test-tool proc-receive -v --die-read-commands 108 108 EOF ··· 132 132 ' 133 133 134 134 test_expect_success "setup proc-receive hook (hook --die-read-push-options, $PROTOCOL)" ' 135 - write_script "$upstream/hooks/proc-receive" <<-EOF 135 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 136 136 printf >&2 "# proc-receive hook\n" 137 137 test-tool proc-receive -v --die-read-push-options 138 138 EOF ··· 164 164 ' 165 165 166 166 test_expect_success "setup proc-receive hook (hook --die-write-report, $PROTOCOL)" ' 167 - write_script "$upstream/hooks/proc-receive" <<-EOF 167 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 168 168 printf >&2 "# proc-receive hook\n" 169 169 test-tool proc-receive -v --die-write-report 170 170 EOF ··· 194 194 ' 195 195 196 196 test_expect_success "setup proc-receive hook (no report, $PROTOCOL)" ' 197 - write_script "$upstream/hooks/proc-receive" <<-EOF 197 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 198 198 printf >&2 "# proc-receive hook\n" 199 199 test-tool proc-receive -v 200 200 EOF ··· 236 236 ' 237 237 238 238 test_expect_success "setup proc-receive hook (no ref, $PROTOCOL)" ' 239 - write_script "$upstream/hooks/proc-receive" <<-EOF 239 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 240 240 printf >&2 "# proc-receive hook\n" 241 241 test-tool proc-receive -v \ 242 242 -r "ok" ··· 269 269 ' 270 270 271 271 test_expect_success "setup proc-receive hook (unknown status, $PROTOCOL)" ' 272 - write_script "$upstream/hooks/proc-receive" <<-EOF 272 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 273 273 printf >&2 "# proc-receive hook\n" 274 274 test-tool proc-receive -v \ 275 275 -r "xx refs/for/main/topic"
+9 -9
t/t5411/test-0014-bad-protocol--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook (unknown version, $PROTOCOL/porcelain)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v --version 2 5 5 EOF ··· 40 40 ' 41 41 42 42 test_expect_success "setup proc-receive hook (hook --die-read-version, $PROTOCOL/porcelain)" ' 43 - write_script "$upstream/hooks/proc-receive" <<-EOF 43 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 44 44 printf >&2 "# proc-receive hook\n" 45 45 test-tool proc-receive -v --die-read-version 46 46 EOF ··· 71 71 ' 72 72 73 73 test_expect_success "setup proc-receive hook (hook --die-write-version, $PROTOCOL/porcelain)" ' 74 - write_script "$upstream/hooks/proc-receive" <<-EOF 74 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 75 75 printf >&2 "# proc-receive hook\n" 76 76 test-tool proc-receive -v --die-write-version 77 77 EOF ··· 102 102 ' 103 103 104 104 test_expect_success "setup proc-receive hook (hook --die-read-commands, $PROTOCOL/porcelain)" ' 105 - write_script "$upstream/hooks/proc-receive" <<-EOF 105 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 106 106 printf >&2 "# proc-receive hook\n" 107 107 test-tool proc-receive -v --die-read-commands 108 108 EOF ··· 132 132 ' 133 133 134 134 test_expect_success "setup proc-receive hook (hook --die-read-push-options, $PROTOCOL/porcelain)" ' 135 - write_script "$upstream/hooks/proc-receive" <<-EOF 135 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 136 136 printf >&2 "# proc-receive hook\n" 137 137 test-tool proc-receive -v --die-read-push-options 138 138 EOF ··· 164 164 ' 165 165 166 166 test_expect_success "setup proc-receive hook (hook --die-write-report, $PROTOCOL/porcelain)" ' 167 - write_script "$upstream/hooks/proc-receive" <<-EOF 167 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 168 168 printf >&2 "# proc-receive hook\n" 169 169 test-tool proc-receive -v --die-write-report 170 170 EOF ··· 194 194 ' 195 195 196 196 test_expect_success "setup proc-receive hook (no report, $PROTOCOL/porcelain)" ' 197 - write_script "$upstream/hooks/proc-receive" <<-EOF 197 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 198 198 printf >&2 "# proc-receive hook\n" 199 199 test-tool proc-receive -v 200 200 EOF ··· 236 236 ' 237 237 238 238 test_expect_success "setup proc-receive hook (no ref, $PROTOCOL/porcelain)" ' 239 - write_script "$upstream/hooks/proc-receive" <<-EOF 239 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 240 240 printf >&2 "# proc-receive hook\n" 241 241 test-tool proc-receive -v \ 242 242 -r "ok" ··· 270 270 ' 271 271 272 272 test_expect_success "setup proc-receive hook (unknown status, $PROTOCOL/porcelain)" ' 273 - write_script "$upstream/hooks/proc-receive" <<-EOF 273 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 274 274 printf >&2 "# proc-receive hook\n" 275 275 test-tool proc-receive -v \ 276 276 -r "xx refs/for/main/topic"
+2 -2
t/t5411/test-0020-report-ng.sh
··· 1 1 test_expect_success "setup proc-receive hook (ng, no message, $PROTOCOL)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ng refs/for/main/topic" ··· 31 31 ' 32 32 33 33 test_expect_success "setup proc-receive hook (ng message, $PROTOCOL)" ' 34 - write_script "$upstream/hooks/proc-receive" <<-EOF 34 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 35 35 printf >&2 "# proc-receive hook\n" 36 36 test-tool proc-receive -v \ 37 37 -r "ng refs/for/main/topic error msg"
+2 -2
t/t5411/test-0021-report-ng--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook (ng, no message, $PROTOCOL/porcelain)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ng refs/for/main/topic" ··· 32 32 ' 33 33 34 34 test_expect_success "setup proc-receive hook (ng message, $PROTOCOL/porcelain)" ' 35 - write_script "$upstream/hooks/proc-receive" <<-EOF 35 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 36 36 printf >&2 "# proc-receive hook\n" 37 37 test-tool proc-receive -v \ 38 38 -r "ng refs/for/main/topic error msg"
+1 -1
t/t5411/test-0022-report-unexpect-ref.sh
··· 1 1 test_expect_success "setup proc-receive hook (unexpected ref, $PROTOCOL)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/heads/main"
+1 -1
t/t5411/test-0023-report-unexpect-ref--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook (unexpected ref, $PROTOCOL/porcelain)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/heads/main"
+1 -1
t/t5411/test-0024-report-unknown-ref.sh
··· 1 1 test_expect_success "setup proc-receive hook (unexpected ref, $PROTOCOL)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/for/main/topic"
+1 -1
t/t5411/test-0025-report-unknown-ref--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook (unexpected ref, $PROTOCOL/porcelain)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/for/main/topic"
+3 -3
t/t5411/test-0026-push-options.sh
··· 1 1 test_expect_success "setup proc-receive hook and disable push-options ($PROTOCOL)" ' 2 2 git -C "$upstream" config receive.advertisePushOptions false && 3 - write_script "$upstream/hooks/proc-receive" <<-EOF 3 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 4 4 printf >&2 "# proc-receive hook\n" 5 5 test-tool proc-receive -v \ 6 6 -r "ok refs/for/main/topic" ··· 31 31 ' 32 32 33 33 test_expect_success "setup version=0 for proc-receive hook ($PROTOCOL)" ' 34 - write_script "$upstream/hooks/proc-receive" <<-EOF 34 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 35 35 printf >&2 "# proc-receive hook\n" 36 36 test-tool proc-receive -v \ 37 37 --version 0 \ ··· 75 75 ' 76 76 77 77 test_expect_success "restore proc-receive hook ($PROTOCOL)" ' 78 - write_script "$upstream/hooks/proc-receive" <<-EOF 78 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 79 79 printf >&2 "# proc-receive hook\n" 80 80 test-tool proc-receive -v \ 81 81 -r "ok refs/for/main/topic"
+3 -3
t/t5411/test-0027-push-options--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook and disable push-options ($PROTOCOL/porcelain)" ' 2 2 git -C "$upstream" config receive.advertisePushOptions false && 3 - write_script "$upstream/hooks/proc-receive" <<-EOF 3 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 4 4 printf >&2 "# proc-receive hook\n" 5 5 test-tool proc-receive -v \ 6 6 -r "ok refs/for/main/topic" ··· 32 32 ' 33 33 34 34 test_expect_success "setup version=0 for proc-receive hook ($PROTOCOL/porcelain)" ' 35 - write_script "$upstream/hooks/proc-receive" <<-EOF 35 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 36 36 printf >&2 "# proc-receive hook\n" 37 37 test-tool proc-receive -v \ 38 38 --version 0 \ ··· 78 78 ' 79 79 80 80 test_expect_success "restore proc-receive hook ($PROTOCOL/porcelain)" ' 81 - write_script "$upstream/hooks/proc-receive" <<-EOF 81 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 82 82 printf >&2 "# proc-receive hook\n" 83 83 test-tool proc-receive -v \ 84 84 -r "ok refs/for/main/topic"
+1 -1
t/t5411/test-0030-report-ok.sh
··· 1 1 test_expect_success "setup proc-receive hook (ok, $PROTOCOL)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/for/main/topic"
+1 -1
t/t5411/test-0031-report-ok--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook (ok, $PROTOCOL/porcelain)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/for/main/topic"
+7 -7
t/t5411/test-0032-report-with-options.sh
··· 1 1 test_expect_success "setup proc-receive hook (option without matching ok, $PROTOCOL)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "option refname refs/pull/123/head" \ ··· 30 30 ' 31 31 32 32 test_expect_success "setup proc-receive hook (option refname, $PROTOCOL)" ' 33 - write_script "$upstream/hooks/proc-receive" <<-EOF 33 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 34 34 printf >&2 "# proc-receive hook\n" 35 35 test-tool proc-receive -v \ 36 36 -r "ok refs/for/main/topic" \ ··· 62 62 ' 63 63 64 64 test_expect_success "setup proc-receive hook (option refname and forced-update, $PROTOCOL)" ' 65 - write_script "$upstream/hooks/proc-receive" <<-EOF 65 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 66 66 printf >&2 "# proc-receive hook\n" 67 67 test-tool proc-receive -v \ 68 68 -r "ok refs/for/main/topic" \ ··· 95 95 ' 96 96 97 97 test_expect_success "setup proc-receive hook (option refname and old-oid, $PROTOCOL)" ' 98 - write_script "$upstream/hooks/proc-receive" <<-EOF 98 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 99 99 printf >&2 "# proc-receive hook\n" 100 100 test-tool proc-receive -v \ 101 101 -r "ok refs/for/main/topic" \ ··· 129 129 ' 130 130 131 131 test_expect_success "setup proc-receive hook (option old-oid, $PROTOCOL)" ' 132 - write_script "$upstream/hooks/proc-receive" <<-EOF 132 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 133 133 printf >&2 "# proc-receive hook\n" 134 134 test-tool proc-receive -v \ 135 135 -r "ok refs/for/main/topic" \ ··· 161 161 ' 162 162 163 163 test_expect_success "setup proc-receive hook (option old-oid and new-oid, $PROTOCOL)" ' 164 - write_script "$upstream/hooks/proc-receive" <<-EOF 164 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 165 165 printf >&2 "# proc-receive hook\n" 166 166 test-tool proc-receive -v \ 167 167 -r "ok refs/for/main/topic" \ ··· 195 195 ' 196 196 197 197 test_expect_success "setup proc-receive hook (report with multiple rewrites, $PROTOCOL)" ' 198 - write_script "$upstream/hooks/proc-receive" <<-EOF 198 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 199 199 printf >&2 "# proc-receive hook\n" 200 200 test-tool proc-receive -v \ 201 201 -r "ok refs/for/a/b/c/topic" \
+7 -7
t/t5411/test-0033-report-with-options--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook (option without matching ok, $PROTOCOL/porcelain)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "option refname refs/pull/123/head" \ ··· 31 31 ' 32 32 33 33 test_expect_success "setup proc-receive hook (option refname, $PROTOCOL/porcelain)" ' 34 - write_script "$upstream/hooks/proc-receive" <<-EOF 34 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 35 35 printf >&2 "# proc-receive hook\n" 36 36 test-tool proc-receive -v \ 37 37 -r "ok refs/for/main/topic" \ ··· 64 64 ' 65 65 66 66 test_expect_success "setup proc-receive hook (option refname and forced-update, $PROTOCOL/porcelain)" ' 67 - write_script "$upstream/hooks/proc-receive" <<-EOF 67 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 68 68 printf >&2 "# proc-receive hook\n" 69 69 test-tool proc-receive -v \ 70 70 -r "ok refs/for/main/topic" \ ··· 99 99 ' 100 100 101 101 test_expect_success "setup proc-receive hook (option refname and old-oid, $PROTOCOL/porcelain)" ' 102 - write_script "$upstream/hooks/proc-receive" <<-EOF 102 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 103 103 printf >&2 "# proc-receive hook\n" 104 104 test-tool proc-receive -v \ 105 105 -r "ok refs/for/main/topic" \ ··· 134 134 ' 135 135 136 136 test_expect_success "setup proc-receive hook (option old-oid, $PROTOCOL/porcelain)" ' 137 - write_script "$upstream/hooks/proc-receive" <<-EOF 137 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 138 138 printf >&2 "# proc-receive hook\n" 139 139 test-tool proc-receive -v \ 140 140 -r "ok refs/for/main/topic" \ ··· 167 167 ' 168 168 169 169 test_expect_success "setup proc-receive hook (option old-oid and new-oid, $PROTOCOL/porcelain)" ' 170 - write_script "$upstream/hooks/proc-receive" <<-EOF 170 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 171 171 printf >&2 "# proc-receive hook\n" 172 172 test-tool proc-receive -v \ 173 173 -r "ok refs/for/main/topic" \ ··· 202 202 ' 203 203 204 204 test_expect_success "setup proc-receive hook (report with multiple rewrites, $PROTOCOL/porcelain)" ' 205 - write_script "$upstream/hooks/proc-receive" <<-EOF 205 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 206 206 printf >&2 "# proc-receive hook\n" 207 207 test-tool proc-receive -v \ 208 208 -r "ok refs/for/a/b/c/topic" \
+1 -1
t/t5411/test-0034-report-ft.sh
··· 1 1 test_expect_success "setup proc-receive hook (ft, $PROTOCOL)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/for/main/topic" \
+1 -1
t/t5411/test-0035-report-ft--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook (fall-through, $PROTOCOL/porcelain)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/for/main/topic" \
+3 -3
t/t5411/test-0036-report-multi-rewrite-for-one-ref.sh
··· 14 14 ' 15 15 16 16 test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no refname for the 1st rewrite, $PROTOCOL)" ' 17 - write_script "$upstream/hooks/proc-receive" <<-EOF 17 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 18 18 printf >&2 "# proc-receive hook\n" 19 19 test-tool proc-receive -v \ 20 20 -r "ok refs/for/main/topic" \ ··· 87 87 ' 88 88 89 89 test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no refname for the 2nd rewrite, $PROTOCOL)" ' 90 - write_script "$upstream/hooks/proc-receive" <<-EOF 90 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 91 91 printf >&2 "# proc-receive hook\n" 92 92 test-tool proc-receive -v \ 93 93 -r "ok refs/for/main/topic" \ ··· 162 162 ' 163 163 164 164 test_expect_success "setup proc-receive hook (multiple rewrites for one ref, $PROTOCOL)" ' 165 - write_script "$upstream/hooks/proc-receive" <<-EOF 165 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 166 166 printf >&2 "# proc-receive hook\n" 167 167 test-tool proc-receive -v \ 168 168 -r "ok refs/for/main/topic" \
+3 -3
t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no refname for the 1st rewrite, $PROTOCOL/porcelain)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/for/main/topic" \ ··· 58 58 ' 59 59 60 60 test_expect_success "setup proc-receive hook (multiple rewrites for one ref, no refname for the 2nd rewrite, $PROTOCOL/porcelain)" ' 61 - write_script "$upstream/hooks/proc-receive" <<-EOF 61 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 62 62 printf >&2 "# proc-receive hook\n" 63 63 test-tool proc-receive -v \ 64 64 -r "ok refs/for/main/topic" \ ··· 119 119 ' 120 120 121 121 test_expect_success "setup proc-receive hook (multiple rewrites for one ref, $PROTOCOL/porcelain)" ' 122 - write_script "$upstream/hooks/proc-receive" <<-EOF 122 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 123 123 printf >&2 "# proc-receive hook\n" 124 124 test-tool proc-receive -v \ 125 125 -r "ok refs/for/main/topic" \
+1 -1
t/t5411/test-0038-report-mixed-refs.sh
··· 1 1 test_expect_success "setup proc-receive hook ($PROTOCOL)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/for/next/topic2" \
+1 -1
t/t5411/test-0039-report-mixed-refs--porcelain.sh
··· 1 1 test_expect_success "setup proc-receive hook ($PROTOCOL/porcelain)" ' 2 - write_script "$upstream/hooks/proc-receive" <<-EOF 2 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 3 3 printf >&2 "# proc-receive hook\n" 4 4 test-tool proc-receive -v \ 5 5 -r "ok refs/for/next/topic2" \
+1 -1
t/t5411/test-0040-process-all-refs.sh
··· 17 17 ' 18 18 19 19 test_expect_success "setup proc-receive hook ($PROTOCOL)" ' 20 - write_script "$upstream/hooks/proc-receive" <<-EOF 20 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 21 21 printf >&2 "# proc-receive hook\n" 22 22 test-tool proc-receive -v \ 23 23 -r "ok refs/heads/main" \
+1 -1
t/t5411/test-0041-process-all-refs--porcelain.sh
··· 17 17 ' 18 18 19 19 test_expect_success "setup proc-receive hook ($PROTOCOL/porcelain)" ' 20 - write_script "$upstream/hooks/proc-receive" <<-EOF 20 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 21 21 printf >&2 "# proc-receive hook\n" 22 22 test-tool proc-receive -v \ 23 23 -r "ok refs/heads/main" \
+2 -2
t/t5411/test-0050-proc-receive-refs-with-modifiers.sh
··· 9 9 ' 10 10 11 11 test_expect_success "setup proc-receive hook ($PROTOCOL)" ' 12 - write_script "$upstream/hooks/proc-receive" <<-EOF 12 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 13 13 printf >&2 "# proc-receive hook\n" 14 14 test-tool proc-receive -v \ 15 15 -r "ok refs/heads/main" \ ··· 70 70 ' 71 71 72 72 test_expect_success "setup proc-receive hook ($PROTOCOL)" ' 73 - write_script "$upstream/hooks/proc-receive" <<-EOF 73 + test_hook -C "$upstream" --clobber proc-receive <<-EOF 74 74 printf >&2 "# proc-receive hook\n" 75 75 test-tool proc-receive -v \ 76 76 -r "ok refs/heads/main" \