projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0746b62
)
[PATCH] Fix math thinko in similarity estimator.
author
Junio C Hamano
<junkio@cox.net>
Fri, 27 May 2005 22:49:54 +0000
(15:49 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Sun, 29 May 2005 18:17:43 +0000
(11:17 -0700)
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>
diffcore-rename.c
patch
|
blob
|
history
diff --git
a/diffcore-rename.c
b/diffcore-rename.c
index
07782f4
..
81e4d9d
100644
(file)
--- 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. */