aboutsummaryrefslogtreecommitdiffstats
path: root/diffcore-rename.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-27 15:49:54 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-29 11:17:43 -0700
commita00d7d106aa333c4b4d0095f58e05c0c4621bbc2 (patch)
tree8d9e9c9e7476a7c21568176a1d5d3bfa7018b54b /diffcore-rename.c
parent0746b620010d5e3b48f6fdb210edf3a066d0bc6a (diff)
downloadgit-a00d7d106aa333c4b4d0095f58e05c0c4621bbc2.tar.gz
[PATCH] Fix math thinko in similarity estimator.
The math to reject delta that is too big was confused. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r--diffcore-rename.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 07782f4b7b..81e4d9df3d 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -163,7 +163,7 @@ static int estimate_similarity(struct diff_filespec *src,
/* A delta that has a lot of literal additions would have
* big delta_size no matter what else it does.
*/
- if (minimum_score < MAX_SCORE * delta_size / base_size)
+ if (base_size * (MAX_SCORE-minimum_score) < delta_size * MAX_SCORE)
return 0;
/* Estimate the edit size by interpreting delta. */