author | Junio C Hamano <gitster@pobox.com> | |
Wed, 20 Aug 2008 18:47:55 +0000 (11:47 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 20 Aug 2008 20:28:19 +0000 (13:28 -0700) | ||
commit | c35539eb10b0ab2a180e523f03ff65dc061bd47e | |
tree | 2b45033cc208e7edd75dd4a2b5803d5eabd774c7 | tree | snapshot |
parent | c71e917975ecd5fdc4caef245cf18b244213e3f6 | commit | diff |
diff --check: do not get confused by new blank lines in the middle
The code remembered that the last diff output it saw was an empty line,
and tried to reset that state whenever it sees a context line, a non-blank
new line, or a new hunk. However, this codepath asks the underlying diff
engine to feed diff without any context, and the "just saw an empty line"
state was not reset if you added a new blank line in the last hunk of your
patch, even if it is not the last line of the file.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The code remembered that the last diff output it saw was an empty line,
and tried to reset that state whenever it sees a context line, a non-blank
new line, or a new hunk. However, this codepath asks the underlying diff
engine to feed diff without any context, and the "just saw an empty line"
state was not reset if you added a new blank line in the last hunk of your
patch, even if it is not the last line of the file.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | diff | blob | history | |
t/t4015-diff-whitespace.sh | diff | blob | history |