]> source.dussan.org Git - jgit.git/commitdiff
SimilarityIndex: Correct comment explaining the logic 97/1897/1
authorShawn O. Pearce <spearce@spearce.org>
Fri, 12 Nov 2010 19:50:38 +0000 (11:50 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 12 Nov 2010 19:56:57 +0000 (11:56 -0800)
This comment was wrong, due to a copy-and-paste error.  Here the
code is looking at records of dst that do not exist in src, and
are skipping past them to find another match.

Change-Id: I07c1fba7dee093a1eeffcf7e0c7ec85446777ffb
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java

index 6627268e48c543079117d20ab9ad2e26f8ef7b6e..853132589589988d4f1780c8568d09f0b2847741 100644 (file)
@@ -230,8 +230,8 @@ class SimilarityIndex {
                                        break;
                                srcKey = keyOf(srcHash[srcIdx]);
 
-                       } else /* if (srcKey > dstKey) */{
-                               // Regions of dst which do not appear in dst.
+                       } else /* if (dstKey < srcKey) */{
+                               // Regions of dst which do not appear in src.
                                if (++dstIdx == dstHash.length)
                                        break;
                                dstKey = keyOf(dstHash[dstIdx]);