diff options
author | Junio C Hamano <junkio@cox.net> | 2005-05-27 15:49:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-29 11:17:43 -0700 |
commit | a00d7d106aa333c4b4d0095f58e05c0c4621bbc2 (patch) | |
tree | 8d9e9c9e7476a7c21568176a1d5d3bfa7018b54b /diffcore-rename.c | |
parent | 0746b620010d5e3b48f6fdb210edf3a066d0bc6a (diff) | |
download | git-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.c | 2 |
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. */ |