Fix: failed to validate Change-Id of some new patch-sets pushed by 'refs/changes'
Those new patch-sets pushed by 'refs/changes/xxxxx/new' or 'refs/changes/xxxxx' can not
get Change-Id validation, because the CommitValidators.NEW_PATCHSET can not match them.
Before 15d5ac0e7, the CommitValidators.NEW_PATCHSET was same with ReceiveCommits.NEW_PATCHSET
and there was not this hole. 15d5ac0e7 updated CommitValidators.NEW_PATCHSET to ensure validating
the Change-Id of [a] and [b].
This commit replaces CommitValidators.NEW_PATCHSET with ReceiveCommits.NEW_PATCHSET and only keep
the later one to plug this hole, and updates the ref name of ReceiveCommand for [a] and [b]
to keep [a] and [b]'s Chang-Id get validation as before.
[a] is of new change:
'refs/changes/nn/mmmnn/x' -> 'refs/publish/<branch name>
[b] is of new patch-set of an existing change:
'refs/changes/nn/mmmnn/x' -> 'refs/changes/nn/mmmnn/new'
Now the ref pattern of ReceiveCommand created via UI falls into line with those pushed via ssh
[a]: new change created by 'Revert' button.
[b]: new patch-set created by 'Edit Commit Message' icon.
3 files changed