git/xdiff
Junio C Hamano 78ed710fcf xutils: Fix hashing an incomplete line with whitespaces at the end
Upon seeing a whitespace, xdl_hash_record_with_whitespace() first skipped
the run of whitespaces (excluding LF) that begins there, ensuring that the
pointer points at the last whitespace character in the run, and assumed
that the next character must be LF at the end of the line.  This does not
work when hashing an incomplete line, which lacks the LF at the end.

Introduce "at_eol" variable that is true when either we are at the end of
line (looking at LF) or at the end of an incomplete line, and use that
instead throughout the code.

Noticed by Thell Fowler.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-23 13:17:59 -07:00
..
xdiff.h Allow alternate "low-level" emit function from xdl_diff 2008-10-25 12:09:31 -07:00
xdiffi.c Allow alternate "low-level" emit function from xdl_diff 2008-10-25 12:09:31 -07:00
xdiffi.h War on whitespace 2007-06-07 00:04:01 -07:00
xemit.c Allow alternate "low-level" emit function from xdl_diff 2008-10-25 12:09:31 -07:00
xemit.h Allow alternate "low-level" emit function from xdl_diff 2008-10-25 12:09:31 -07:00
xinclude.h War on whitespace 2007-06-07 00:04:01 -07:00
xmacros.h War on whitespace 2007-06-07 00:04:01 -07:00
xmerge.c xmerge.c: "diff3 -m" style clips merge reduction level to EAGER or less 2008-08-30 19:41:43 -07:00
xprepare.c xdiff: give up scanning similar lines early 2008-12-02 23:45:37 -08:00
xprepare.h War on whitespace 2007-06-07 00:04:01 -07:00
xtypes.h War on whitespace 2007-06-07 00:04:01 -07:00
xutils.c xutils: Fix hashing an incomplete line with whitespaces at the end 2009-08-23 13:17:59 -07:00
xutils.h War on whitespace 2007-06-07 00:04:01 -07:00