提交 ee3d299e 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <junkio@cox.net>
上级 a0dfb48a
......@@ -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%)*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册