Improve the feedback of push ... refs/changes/xxxx

On the second push using the same refs/changes/<change>
with the first push, the feedback will still be
'* [new branch]      HEAD -> refs/changes/<change>'
but in fact this push is skipped by Gerrit.

Improve the feedback to be:
'! [remote rejected] HEAD -> refs/changes/<change> (commit already exists)'

Change-Id: Iad57c491be0927617fba0b2810a159295d19be41
This commit is contained in:
Bruce Zu
2013-11-30 01:37:58 +08:00
parent 0c4bde4669
commit d243c71655

View File

@@ -1708,6 +1708,7 @@ public class ReceiveCommits {
if (newCommit == priorCommit) {
// Ignore requests to make the change its current state.
skip = true;
reject(inputCommand, "commit already exists");
return false;
}