From ba905906c1a0b56232ef987db4c6c77d44f25f25 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Thu, 14 Nov 2024 22:12:02 +0100 Subject: [PATCH] Change default similarity score to 50(%) to match git's default 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 --- .../src/org/eclipse/jgit/diff/SimilarityRenameDetector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java index 5de7bac112..fb98df7c9e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java @@ -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 -- 2.39.5