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-0025-report-unknown-ref--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-0025-report-unknown-ref--porcelain.sh` 33 lines ยท 1305 bytes Raw Blame History 1 test_expect_success "setup proc-receive hook (unexpected ref, $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 "ok 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/a/b/c/my/topic 12 test_expect_success "proc-receive: report unknown reference ($PROTOCOL/porcelain)" ' 13 test_must_fail git -C workbench push --porcelain origin \ 14 HEAD:refs/for/a/b/c/my/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/a/b/c/my/topic Z 20 > remote: # proc-receive hook Z 21 > remote: proc-receive< refs/for/a/b/c/my/topic Z 22 > remote: proc-receive> ok refs/for/main/topic Z 23 > remote: error: proc-receive reported status on unknown ref: refs/for/main/topic Z 24 > To 25 > ! HEAD:refs/for/a/b/c/my/topic [remote rejected] (proc-receive failed to report status) 26 > Done 27 EOF 28 test_cmp expect actual && 29 30 test_cmp_refs -C "$upstream" <<-EOF 31 refs/heads/main 32 EOF 33 '