MergeOp: Use Objects.equals when comparing branch tip
This currently works, because MergeTip doesn't copy or otherwise mess around with the initial tip object passed in. But MergeTip doesn't state that in its contract, so this may be a bug waiting to happen. Change-Id: I61fd71c7f6895d4efb67edbec056b6534b8b94a4
This commit is contained in:
@@ -655,7 +655,7 @@ public class MergeOp {
|
||||
BatchRefUpdate branchUpdate) throws MergeException {
|
||||
CodeReviewCommit currentTip =
|
||||
mergeTip != null ? mergeTip.getCurrentTip() : null;
|
||||
if (branchTip == currentTip) {
|
||||
if (Objects.equals(branchTip, currentTip)) {
|
||||
logDebug("Branch already at merge tip {}, no update to perform",
|
||||
currentTip.name());
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user