author | Kevin Ballard <kevin@sb.org> | |
Wed, 20 Oct 2010 22:17:26 +0000 (15:17 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 20 Oct 2010 23:10:15 +0000 (16:10 -0700) | ||
commit | cfd1a9849cdb4b9c7fcd0cb71a28cbdbc3494329 | |
tree | 7db093285bb283c71812edad1e49942e5b996c03 | tree | snapshot |
parent | a471833d51b0902d68f9190157bf1421d19a951a | commit | diff |
diff: handle lines containing only whitespace and tabs better
When a line contains nothing but whitespace with at least one tab
and the core.whitespace config option contains blank-at-eol, the
whitespace on the line is being printed twice, once unhighlighted
(unless otherwise matched by one of the other core.whitespace values),
and a second time highlighted for blank-at-eol.
Update the leading indentation check to stop checking when it reaches
the trailing whitespace.
Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When a line contains nothing but whitespace with at least one tab
and the core.whitespace config option contains blank-at-eol, the
whitespace on the line is being printed twice, once unhighlighted
(unless otherwise matched by one of the other core.whitespace values),
and a second time highlighted for blank-at-eol.
Update the leading indentation check to stop checking when it reaches
the trailing whitespace.
Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4015-diff-whitespace.sh | diff | blob | history | |
ws.c | diff | blob | history |