Bruce Zu cd6572d435 Prevent duplicate commits in same project when uploading to refs/changes/n
Under certain circumstances, when pushing to 'refs/changes/n', the same
commit can be pushed onto multiple changes even if they are on the same
branch.

As a result of this, if the commit sha1 is used as change identifier
in the 'review' ssh command, it will fail with the error:

  'fatal: <SHA1> matches multiple patch sets.'

This commit performs the same check as when pushing to 'refs/for/branch'
to prevent this, and will show "commit already exists (in the project)"
error message to reject uploading a commit to an existing change via
`refs/changes/n` if the commit was already successfully pushed to a change
in project scope.

Bug: issue 2374
Change-Id: I1c000b2cc3e155617cdc9c295a46ce2107ec47ca
2014-03-11 08:26:36 +00:00
2013-05-21 20:28:56 -07:00
2013-05-21 20:28:56 -07:00
2013-09-26 23:12:55 -07:00
2013-05-21 20:28:56 -07:00
2014-03-03 16:10:17 +09:00
2014-03-11 10:43:15 +09:00
2013-09-20 19:41:26 -07:00
2013-11-05 21:38:53 +00:00
2013-12-05 17:20:26 +09:00
2008-11-14 16:59:34 -08:00
2009-03-27 20:20:10 -07:00
2014-03-11 10:43:15 +09:00
Description
RETIRED, Gerrit as used by OpenStack
120 MiB