RebaseIfNecessary: Don't overwrite committer ident

It was necessary to explicitly set this prior to the BatchUpdate
migration, but now the committer is implied by the update context, so
overwriting it is not necessary.

Change-Id: Ibcc872aac9f751659c26bcb9ca2d994c02a05da5
This commit is contained in:
Dave Borowitz
2016-01-13 13:43:41 -05:00
parent 65170c1937
commit a3e3cafffd

View File

@@ -37,7 +37,6 @@ import com.google.gerrit.server.project.NoSuchChangeException;
import com.google.gwtorm.server.OrmException; import com.google.gwtorm.server.OrmException;
import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.PersonIdent;
import java.io.IOException; import java.io.IOException;
import java.util.Collection; import java.util.Collection;
@@ -54,12 +53,6 @@ public class RebaseIfNecessary extends SubmitStrategy {
this.newCommits = new HashMap<>(); this.newCommits = new HashMap<>();
} }
private PersonIdent getSubmitterIdent() {
return args.caller.newCommitterIdent(
args.serverIdent.getWhen(),
args.serverIdent.getTimeZone());
}
@Override @Override
public MergeTip run(final CodeReviewCommit branchTip, public MergeTip run(final CodeReviewCommit branchTip,
final Collection<CodeReviewCommit> toMerge) throws IntegrationException { final Collection<CodeReviewCommit> toMerge) throws IntegrationException {
@@ -163,7 +156,6 @@ public class RebaseIfNecessary extends SubmitStrategy {
// Racy read of patch set is ok; see comments in RebaseChangeOp. // Racy read of patch set is ok; see comments in RebaseChangeOp.
args.db.patchSets().get(toMerge.getPatchsetId()), args.db.patchSets().get(toMerge.getPatchsetId()),
mergeTip.getCurrentTip().name()) mergeTip.getCurrentTip().name())
.setCommitterIdent(getSubmitterIdent())
.setRunHooks(false) .setRunHooks(false)
.setValidatePolicy(CommitValidators.Policy.NONE); .setValidatePolicy(CommitValidators.Policy.NONE);
try { try {