Code

xdiff: give up scanning similar lines early
authorDavide Libenzi <davidel@xmailserver.org>
Sat, 8 Nov 2008 05:24:33 +0000 (21:24 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 8 Nov 2008 17:28:30 +0000 (09:28 -0800)
commit9b28d55401a529ff08c709f42f66e765c93b0a20
tree160929221ee2becefe85d95d5828aa91d07233ef
parent6331adb9c4ec36c70dc3ecc6eb46b7dddb36952d
xdiff: give up scanning similar lines early

In a corner case of large files whose lines do not match uniquely, the
loop to eliminate a line that matches multiple locations adjacent to a run
of lines that do not uniquely match wasted too much cycles.  Fix this by
giving up early after scanning 100 lines in both direction.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xprepare.c