MCPcopy Create free account
hub / github.com/ReZeroS/git / nextMatch

Method nextMatch

src/main/java/club/qqtim/diff/DiffUtil.java:265–277  ·  view source on GitHub ↗
(int indexOrigin, List<LineObject> originLines,
                                        Map<Integer, Integer> matchBaseHead, Map<Integer, Integer> matchBaseOther)

Source from the content-addressed store, hash-verified

263 }
264
265 private static MergePoint nextMatch(int indexOrigin, List<LineObject> originLines,
266 Map<Integer, Integer> matchBaseHead, Map<Integer, Integer> matchBaseOther) {
267 for (int i = indexOrigin + 1; i <= originLines.size(); i++) {
268 final Integer head = matchBaseHead.get(i);
269 final Integer other = matchBaseOther.get(i);
270
271 if (Objects.nonNull(head) && Objects.nonNull(other)) {
272 return new MergePoint(i, head, other);
273 }
274 }
275 return new MergePoint(0, 0, 0);
276
277 }
278
279
280 private static int findNextSyncLine(int index, List<LineObject> fromDiffBase) {

Callers 1

mergeBlobsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected