HunkHeader(FileHeader fh, EditList editList) { this(fh, fh.buf.length); this.editList = editList; endOffset = startOffset; nContext = 0; if (editList.isEmpty()) { newStartLine = 0; newLineCount = 0; } else { newStartLine = editList.get(0).getBeginB(); Edit last = editList.get(editList.size() - 1); newLineCount = last.getEndB() - newStartLine; } }
private boolean split(Candidate parent, Candidate source) throws IOException { EditList editList = diffAlgorithm.diff(textComparator, parent.sourceText, source.sourceText); if (editList.isEmpty()) { // Ignoring whitespace (or some other special comparator) can // cause non-identical blobs to have an empty edit list. In // a case like this push the parent alone. parent.regionList = source.regionList; push(parent); return false; } parent.takeBlame(editList, source); if (parent.regionList != null) push(parent); if (source.regionList != null) { if (source instanceof ReverseCandidate) return reverseResult(parent, source); return result(source); } return false; }
case RENAME: case COPY: if (!editList.isEmpty()) formatOldNewPaths(buf, ent); break;
HunkHeader(final FileHeader fh, final EditList editList) { this(fh, fh.buf.length); this.editList = editList; endOffset = startOffset; nContext = 0; if (editList.isEmpty()) { newStartLine = 0; newLineCount = 0; } else { newStartLine = editList.get(0).getBeginB(); Edit last = editList.get(editList.size() - 1); newLineCount = last.getEndB() - newStartLine; } }
HunkHeader(FileHeader fh, EditList editList) { this(fh, fh.buf.length); this.editList = editList; endOffset = startOffset; nContext = 0; if (editList.isEmpty()) { newStartLine = 0; newLineCount = 0; } else { newStartLine = editList.get(0).getBeginB(); Edit last = editList.get(editList.size() - 1); newLineCount = last.getEndB() - newStartLine; } }
if (editList.isEmpty()) {
private boolean split(Candidate parent, Candidate source) throws IOException { EditList editList = diffAlgorithm.diff(textComparator, parent.sourceText, source.sourceText); if (editList.isEmpty()) { // Ignoring whitespace (or some other special comparator) can // cause non-identical blobs to have an empty edit list. In // a case like this push the parent alone. parent.regionList = source.regionList; push(parent); return false; } parent.takeBlame(editList, source); if (parent.regionList != null) push(parent); if (source.regionList != null) { if (source instanceof ReverseCandidate) return reverseResult(parent, source); return result(source); } return false; }
private boolean split(Candidate parent, Candidate source) throws IOException { EditList editList = diffAlgorithm.diff(textComparator, parent.sourceText, source.sourceText); if (editList.isEmpty()) { // Ignoring whitespace (or some other special comparator) can // cause non-identical blobs to have an empty edit list. In // a case like this push the parent alone. parent.regionList = source.regionList; push(parent); return false; } parent.takeBlame(editList, source); if (parent.regionList != null) push(parent); if (source.regionList != null) { if (source instanceof ReverseCandidate) return reverseResult(parent, source); return result(source); } return false; }
case RENAME: case COPY: if (!editList.isEmpty()) formatOldNewPaths(buf, ent); break;
case RENAME: case COPY: if (!editList.isEmpty()) formatOldNewPaths(buf, ent); break;
if (editList.isEmpty()) {
if (editList.isEmpty()) {