Files
gerrit/src/main/java/com/google/gerrit
Shawn O. Pearce a186fc5c53 Error out if a user forgets to squash when replacing a patch
This condition happens when a user makes a second commit and tries to
replace it onto an existing change, e.g. if they did:

  $ git commit
  $ repo upload
  ... some time later ...

  $ git commit
  $ repo upload --replace .
     ... specify the prior change ...

Gerrit sees that the change depends upon itself, as the latest patch set
has an ancestor that is a prior patch set of the same change.  This is a
very simple case to detect and error out on during upload, ensuring that
the user has an opportunity to correct their usage.

Bug: GERRIT-137
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-04-15 12:44:07 -07:00
..