Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t5411/test-0021-report-ng--porcelain.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t5411 / test-0021-report-ng--porcelain.sh` 65 lines ยท 2360 bytes Raw Blame History 1 test_expect_success "setup proc-receive hook (ng, no message, $PROTOCOL/porcelain)" ' 2 test_hook -C "$upstream" --clobber proc-receive <<-\EOF 3 printf >&2 "# proc-receive hook\n" 4 test-tool proc-receive -v \ 5 -r "ng refs/for/main/topic" 6 EOF 7 ' 8 9 # Refs of upstream : main(A) 10 # Refs of workbench: main(A) tags/v123 11 # git push : refs/for/main/topic 12 test_expect_success "proc-receive: fail to update (ng, no message, $PROTOCOL/porcelain)" ' 13 test_must_fail git -C workbench push --porcelain origin \ 14 HEAD:refs/for/main/topic \ 15 >out-$test_count 2>&1 && 16 make_user_friendly_and_stable_output actual && 17 format_and_save_expect <<-EOF && 18 > remote: # pre-receive hook Z 19 > remote: pre-receive< refs/for/main/topic Z 20 > remote: # proc-receive hook Z 21 > remote: proc-receive< refs/for/main/topic Z 22 > remote: proc-receive> ng refs/for/main/topic Z 23 > To 24 > ! HEAD:refs/for/main/topic [remote rejected] (failed) 25 > Done 26 EOF 27 test_cmp expect actual && 28 29 test_cmp_refs -C "$upstream" <<-EOF 30 refs/heads/main 31 EOF 32 ' 33 34 test_expect_success "setup proc-receive hook (ng message, $PROTOCOL/porcelain)" ' 35 test_hook -C "$upstream" --clobber proc-receive <<-\EOF 36 printf >&2 "# proc-receive hook\n" 37 test-tool proc-receive -v \ 38 -r "ng refs/for/main/topic error msg" 39 EOF 40 ' 41 42 # Refs of upstream : main(A) 43 # Refs of workbench: main(A) tags/v123 44 # git push : refs/for/main/topic 45 test_expect_success "proc-receive: fail to update (ng, with message, $PROTOCOL/porcelain)" ' 46 test_must_fail git -C workbench push --porcelain origin \ 47 HEAD:refs/for/main/topic \ 48 >out-$test_count 2>&1 && 49 make_user_friendly_and_stable_output actual && 50 format_and_save_expect <<-EOF && 51 > remote: # pre-receive hook Z 52 > remote: pre-receive< refs/for/main/topic Z 53 > remote: # proc-receive hook Z 54 > remote: proc-receive< refs/for/main/topic Z 55 > remote: proc-receive> ng refs/for/main/topic error msg Z 56 > To 57 > ! HEAD:refs/for/main/topic [remote rejected] (error msg) 58 > Done 59 EOF 60 test_cmp expect actual && 61 62 test_cmp_refs -C "$upstream" <<-EOF 63 refs/heads/main 64 EOF 65 '