Fix submitting changes with commits that were already merged
Due to bugs it can happen that a change gets into an inconsistent state where the commit of the last patch set is already merged into the destination branch, but the change status is still NEW. In this case the inconsistency should get resolved by submitting the change again. The submit detects that the commit is already merged and then only the change status is updated to MERGED. This already worked for all cases except for Fast Forward Only if several changes got merged, but stayed open. Then submitting the first change again was not possible since the MergeUtil.canFastForward claimed that the change was not mergeable. Change-Id: I73641f02e58298baf6f13da27d37500a44ad6d2b Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -496,7 +496,8 @@ public class MergeUtil {
|
||||
}
|
||||
|
||||
try {
|
||||
return mergeTip == null || rw.isMergedInto(mergeTip, toMerge);
|
||||
return mergeTip == null || rw.isMergedInto(mergeTip, toMerge)
|
||||
|| rw.isMergedInto(toMerge, mergeTip);
|
||||
} catch (IOException e) {
|
||||
throw new IntegrationException("Cannot fast-forward test during merge", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user