rename detection with -M100 means "exact renames only".

When the user is interested in pure renames, there is no point
doing the similarity scores.  This changes the score argument
parsing to special case -M100 (otherwise, it is a precision
scaled value 0 <= v < 1 and would mean 0.1, not 1.0 --- if you
do mean 0.1, you can say -M1), and optimizes the diffcore_rename
transformation to only look at pure renames in that case.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2005-11-21 12:18:23 -08:00
parent 88b5a74883
commit 9f70b80692
2 changed files with 7 additions and 0 deletions

View File

@ -307,6 +307,9 @@ void diffcore_rename(struct diff_options *options)
if (rename_count == rename_dst_nr)
goto cleanup;
if (minimum_score == MAX_SCORE)
goto cleanup;
num_create = (rename_dst_nr - rename_count);
num_src = rename_src_nr;
mx = xmalloc(sizeof(*mx) * num_create * num_src);