63518a574a
The new introduced "proc-receive" hook may handle a command for a pseudo-reference with a zero-old as its old-oid, while the hook may create or update a reference with different name, different new-oid, and different old-oid (the reference may exist already with a non-zero old-oid). Current "report-status" protocol cannot report the status for such reference rewrite. Add new capability "report-status-v2" and new report protocol which is not backward compatible for report of git-push. If a user pushes to a pseudo-reference "refs/for/master/topic", and "receive-pack" creates two new references "refs/changes/23/123/1" and "refs/changes/24/124/1", for client without the knowledge of "report-status-v2", "receive-pack" will only send "ok/ng" directives in the report, such as: ok ref/for/master/topic But for client which has the knowledge of "report-status-v2", "receive-pack" will use "option" directives to report more attributes for the reference given by the above "ok/ng" directive. ok refs/for/master/topic option refname refs/changes/23/123/1 option new-oid <new-oid> ok refs/for/master/topic option refname refs/changes/24/124/1 option new-oid <new-oid> The client will report two new created references to the end user. Suggested-by: Junio C Hamano <gitster@pobox.com> Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
common-functions.sh | ||
once-0010-report-status-v1.sh | ||
test-0000-standard-git-push.sh | ||
test-0001-standard-git-push--porcelain.sh | ||
test-0002-pre-receive-declined.sh | ||
test-0003-pre-receive-declined--porcelain.sh | ||
test-0011-no-hook-error.sh | ||
test-0012-no-hook-error--porcelain.sh | ||
test-0013-bad-protocol.sh | ||
test-0014-bad-protocol--porcelain.sh | ||
test-0020-report-ng.sh | ||
test-0021-report-ng--porcelain.sh | ||
test-0022-report-unexpect-ref.sh | ||
test-0023-report-unexpect-ref--porcelain.sh | ||
test-0024-report-unknown-ref.sh | ||
test-0025-report-unknown-ref--porcelain.sh | ||
test-0026-push-options.sh | ||
test-0027-push-options--porcelain.sh | ||
test-0030-report-ok.sh | ||
test-0031-report-ok--porcelain.sh | ||
test-0032-report-with-options.sh | ||
test-0033-report-with-options--porcelain.sh | ||
test-0034-report-ft.sh | ||
test-0035-report-ft--porcelain.sh | ||
test-0036-report-multi-rewrite-for-one-ref.sh | ||
test-0037-report-multi-rewrite-for-one-ref--porcelain.sh | ||
test-0038-report-mixed-refs.sh | ||
test-0039-report-mixed-refs--porcelain.sh |