improve diff-delta with sparse and/or repetitive data
improve diff-delta with sparse and/or repetitive data

It is useless to preserve multiple hash entries for consecutive blocks
with the same hash.  Keeping only the first one will allow for matching
the longest string of identical bytes while subsequent blocks will only
allow for shorter matches.  The backward matching code will match the
end of it as necessary.

This improves both performances (no repeated string compare with long
successions of identical bytes, or even small group of bytes), as well
as compression (less likely to need random hash bucket entry culling),
especially with sparse files.

With well behaved data sets this patch doesn't change much.

Signed-off-by: Nicolas Pitre <d659c10e27d52b00987b65e85d99bce5480adcae@cam.org>
Signed-off-by: Junio C Hamano <dc50d1021234060e53ec42a77d526afa2fe07479@cox.net>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git