]> source.dussan.org Git - jgit.git/commitdiff
eclipse-iplog: Correct line counts in initial commit 39/339/2
authorShawn O. Pearce <spearce@spearce.org>
Thu, 11 Mar 2010 19:36:26 +0000 (11:36 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 11 Mar 2010 23:15:03 +0000 (15:15 -0800)
The initial commit line counts where wrong in the IP log, as we
were incrementing the file pointer by not the number of bytes in
the line, but the offset of the start of the next line.

Change-Id: Ia220ba235e9fa522f3f5591b76652c174bcb094d
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java

index 1f60ee5628366194740c5f8c07679a51cb3ade63..040887ece4aafbeef7b76d941090214aee38fde4 100644 (file)
@@ -389,7 +389,7 @@ public class IpLogGenerator {
                                        if (tw.getFileMode(0).getObjectType() == Constants.OBJ_BLOB) {
                                                byte[] buf = openBlob(0);
                                                for (int ptr = 0; ptr < buf.length;) {
-                                                       ptr += RawParseUtils.nextLF(buf, ptr);
+                                                       ptr = RawParseUtils.nextLF(buf, ptr);
                                                        addedLines++;
                                                }
                                        }