summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81e50ea)
raw | patch | inline | side by side (parent: 81e50ea)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 22 May 2005 08:31:28 +0000 (01:31 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sun, 22 May 2005 16:38:26 +0000 (09:38 -0700) |
There was a screwy math bug in the estimator that confused what
-C1 meant and what -C9 meant, only in one of the early "cheap"
check, which resulted in quite confusing behaviour.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-C1 meant and what -C9 meant, only in one of the early "cheap"
check, which resulted in quite confusing behaviour.
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 28b1de25de4d8444bdf369506f04126b6aede665..ff5c182df852651ce966d3f8f4cd6dbdcf458a62 100644 (file)
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
/* We would not consider edits that change the file size so
* drastically. delta_size must be smaller than
- * minimum_score/MAX_SCORE * min(src->size, dst->size).
+ * (MAX_SCORE-minimum_score)/MAX_SCORE * min(src->size, dst->size).
* Note that base_size == 0 case is handled here already
* and the final score computation below would not have a
* divide-by-zero issue.
*/
- if (base_size * minimum_score < delta_size * MAX_SCORE)
+ if (base_size * (MAX_SCORE-minimum_score) < delta_size * MAX_SCORE)
return 0;
delta = diff_delta(src->data, src->size,