summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-16 05:08:42 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-16 05:08:42 (GMT)
commitee3d299e93450586d12f099913261ec22849365a (patch)
treecbffa1c279a929a1d03801dadfe3375f10482a9e
parenta0dfb48af73a98ceb60629f2bbc4ebf1393ba0af (diff)
downloadgit-ee3d299e93450586d12f099913261ec22849365a.zip
git-ee3d299e93450586d12f099913261ec22849365a.tar.gz
git-ee3d299e93450586d12f099913261ec22849365a.tar.bz2
diffcore-break/diffcore-rename: integer overflow.
While reviewing the end user tutorial rewrite by J. Bruce Fields, I noticed that "git-diff-tree -B -C" did not correctly break the total rewrite of Documentation/tutorial.txt. It turns out that we had integer overflow during the break score computations. Cop out by using floating point. This is not a kernel. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--diffcore.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/diffcore.h b/diffcore.h
index a38acb1..12cd816 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -15,7 +15,7 @@
* passed around in one int (high 16-bit for merge and low 16-bit
* for break).
*/
-#define MAX_SCORE 60000
+#define MAX_SCORE 60000.0
#define DEFAULT_RENAME_SCORE 30000 /* rename/copy similarity minimum (50%) */
#define DEFAULT_BREAK_SCORE 30000 /* minimum for break to happen (50%)*/
#define DEFAULT_MERGE_SCORE 48000 /* maximum for break-merge to happen (80%)*/