diffcore_count_changes: pass diffcore_filespec
We may want to use richer information on the data we are dealing with in this function, so instead of passing a buffer address and length, just pass the diffcore_filespec structure. Existing callers always call this function with parameters taken from a filespec anyway, so there is no functionality changes. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -189,8 +189,7 @@ static int estimate_similarity(struct diff_filespec *src,
|
||||
|
||||
delta_limit = (unsigned long)
|
||||
(base_size * (MAX_SCORE-minimum_score) / MAX_SCORE);
|
||||
if (diffcore_count_changes(src->data, src->size,
|
||||
dst->data, dst->size,
|
||||
if (diffcore_count_changes(src, dst,
|
||||
&src->cnt_data, &dst->cnt_data,
|
||||
delta_limit,
|
||||
&src_copied, &literal_added))
|
||||
|
||||
Reference in New Issue
Block a user