Add a "max_size" parameter to diff_delta()
Anything that generates a delta to see if two objects are close usually isn't interested in the delta ends up being bigger than some specified size, and this allows us to stop delta generation early when that happens.
This commit is contained in:
@ -65,7 +65,7 @@ static int should_break(struct diff_filespec *src,
|
||||
|
||||
delta = diff_delta(src->data, src->size,
|
||||
dst->data, dst->size,
|
||||
&delta_size);
|
||||
&delta_size, ~0UL);
|
||||
|
||||
/* Estimate the edit size by interpreting delta. */
|
||||
if (count_delta(delta, delta_size,
|
||||
|
Reference in New Issue
Block a user