From: Linus Torvalds Date: Mon, 13 Mar 2006 06:26:34 +0000 (-0800) Subject: Fix up diffcore-rename scoring X-Git-Tag: v1.3.0-rc1~30^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/90bd932c811f4ecd1d8cbceffdf6a69a5ca838b7?hp=90bd932c811f4ecd1d8cbceffdf6a69a5ca838b7 Fix up diffcore-rename scoring The "score" calculation for diffcore-rename was totally broken. It scaled "score" as score = src_copied * MAX_SCORE / dst->size; which means that you got a 100% similarity score even if src and dest were different, if just every byte of dst was copied from src, even if source was much larger than dst (eg we had copied 85% of the bytes, but _deleted_ the remaining 15%). That's clearly bogus. We should do the score calculation relative not to the destination size, but to the max size of the two. This seems to fix it. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano ---