author | Junio C Hamano <gitster@pobox.com> | |
Fri, 4 Sep 2009 07:41:15 +0000 (00:41 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 4 Sep 2009 18:50:27 +0000 (11:50 -0700) | ||
commit | 690ed8436326484fe7e3f4deac4cffd780c7d630 | |
tree | b6119e4decaeeeb8aad175dabf40e09dfe9ec582 | tree | snapshot |
parent | 467babf8d059caee9587567452fc8b46505b4e67 | commit | diff |
diff --color: color blank-at-eof
Since the coloring logic processed the patch output one line at a time, we
couldn't easily color code the new blank lines at the end of file.
Reuse the adds_blank_at_eof() function to find where the runs of such
blank lines start, keep track of the line number in the preimage while
processing the patch output one line at a time, and paint the new blank
lines that appear after that line to implement this.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Since the coloring logic processed the patch output one line at a time, we
couldn't easily color code the new blank lines at the end of file.
Reuse the adds_blank_at_eof() function to find where the runs of such
blank lines start, keep track of the line number in the preimage while
processing the patch output one line at a time, and paint the new blank
lines that appear after that line to implement this.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | diff | blob | history | |
t/t4019-diff-wserror.sh | diff | blob | history |