Fix the wrong order of RevWalk.isMergedInto in RebaseSorter
RevWalk.isMergedInto takes the base as first argument and the tip as the second argument to check if the base is merged into the tip. The test didn't detect it because in the test the base is the same as the tip. Also add a regression test for this bug. Change-Id: I43742aa4bd75ea64e729c1d3ecf40369002c7e55
This commit is contained in:
@@ -94,8 +94,8 @@ public class RebaseSorter {
|
||||
mirw.reset();
|
||||
mirw.markStart(commit);
|
||||
for (RevCommit accepted : alreadyAccepted) {
|
||||
if (mirw.isMergedInto(mirw.parseCommit(accepted),
|
||||
mirw.parseCommit(commit))) {
|
||||
if (mirw.isMergedInto(mirw.parseCommit(commit),
|
||||
mirw.parseCommit(accepted))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user