]> source.dussan.org Git - jgit.git/commit
Added file size based rename detection optimization 91/1091/2
authorJeff Schumacher <jeffschu@google.com>
Fri, 9 Jul 2010 18:18:50 +0000 (11:18 -0700)
committerJeff Schumacher <jeffschu@google.com>
Mon, 12 Jul 2010 19:24:42 +0000 (12:24 -0700)
commit64b9458640bafadc70028c99bb038480309e568d
tree5b26e567efc9da1162d34a609dddd06a7c38d263
parenta8b29afd82795b3d98b42bf214fea27ab61984cc
Added file size based rename detection optimization

Prior to this change, files that were very different in size (enough
so that they could not have enough in common to be detected as
renames) were still having their scores calculated. I added an
optimization to skip such files. For example, if the rename detection
threshold is 60%, the larger file is 200kb, and the smaller file is
50kb, the pair cannot be counted as a rename since they cannot
possibly share 60% of their content in common. (200*.6=120, 120>50)

Change-Id: Icd8315412d5de6292839778e7cea7fe6f061b0fc
org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java