]> source.dussan.org Git - jgit.git/commitdiff
Change default similarity score to 50(%) to match git's default 08/1203908/2
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 14 Nov 2024 21:12:02 +0000 (22:12 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 14 Nov 2024 21:26:45 +0000 (22:26 +0100)
Git uses a default similarity score of 50(%) for rename detection.
Fix RenameDetector to use the same default score.

See https://git-scm.com/docs/git-diff#Documentation/git-diff.txt--Mltngt

Bug: jgit-110
Change-Id: I4b75910a02bca1afc108ad9e5609fda1e49a29da

org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java

index 5de7bac112344fe229d0a90145307b04db53a363..fb98df7c9e8ab67f676151149ea5b483d1a8be74 100644 (file)
@@ -80,7 +80,7 @@ class SimilarityRenameDetector {
        private long[] matrix;
 
        /** Score a pair must exceed to be considered a rename. */
-       private int renameScore = 60;
+       private int renameScore = 50;
 
        /**
         * File size threshold (in bytes) for detecting renames. Files larger