ReceiveCommits.ReplaceRequest: Parse prior commit body earlier

In I4768e35b, PatchSetUtil.getChangeKind was added, which depends on
the body of both commits being parsed.

Change-Id: Ia9d09b154988becb2802418a35b4b2edccb58284
This commit is contained in:
Dave Borowitz
2013-10-01 10:31:21 -07:00
parent ffc633f72e
commit eeb44d41d0

View File

@@ -1684,12 +1684,12 @@ public class ReceiveCommits {
if (!validCommit(changeCtl.getRefControl(), inputCommand, newCommit)) {
return false;
}
rp.getRevWalk().parseBody(priorCommit);
// Don't allow the same tree if the commit message is unmodified
// or no parents were updated (rebase), else warn that only part
// of the commit was modified.
if (newCommit.getTree() == priorCommit.getTree()) {
rp.getRevWalk().parseBody(priorCommit);
final boolean messageEq =
eq(newCommit.getFullMessage(), priorCommit.getFullMessage());
final boolean parentsEq = parentsEqual(newCommit, priorCommit);