diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java index a6ea74eb1..26a71cd4c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java @@ -401,4 +401,17 @@ public class HunkHeader { final int end = s.indexOf('\n', offsets[fileIdx]); offsets[fileIdx] = end < 0 ? s.length() : end + 1; } + + @Override + public String toString() { + StringBuilder buf = new StringBuilder(); + buf.append("HunkHeader["); + buf.append(getOldImage().getStartLine()); + buf.append(','); + buf.append(getOldImage().getLineCount()); + buf.append("->"); + buf.append(getNewStartLine()).append(',').append(getNewLineCount()); + buf.append(']'); + return buf.toString(); + } }