aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/diff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-11-12 11:50:38 -0800
committerShawn O. Pearce <spearce@spearce.org>2010-11-12 11:56:57 -0800
commitf3b511568b5f6af219bd9c948092bbec46098484 (patch)
tree91bb9be90f46738156a3e4982927eafdf0d672b9 /org.eclipse.jgit/src/org/eclipse/jgit/diff
parentb81b97fbddaab4bc2615fea5301f3eb39e3b03bd (diff)
downloadjgit-f3b511568b5f6af219bd9c948092bbec46098484.tar.gz
jgit-f3b511568b5f6af219bd9c948092bbec46098484.zip
SimilarityIndex: Correct comment explaining the logic
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>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/diff')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
index 6627268e48..8531325895 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
@@ -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]);