author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Thu, 12 Oct 2006 12:22:14 +0000 (14:22 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 12 Oct 2006 16:30:14 +0000 (09:30 -0700) | ||
commit | 2344d47fba45bdddb0801ebf0789935a96e44352 | |
tree | ad6fa1609e53bc42b3da0934f0dd86ae7ddb94e8 | tree | snapshot |
parent | 854de5a5341be4183c401157b9e5593d9a925f4f | commit | diff |
diff: fix 2 whitespace issues
When whitespace or whitespace change was ignored, the function
xdl_recmatch() returned memcmp() style differences, which is wrong,
since it should return 0 on non-match.
Also, there were three horrible off-by-one bugs, even leading to wrong
hashes in the whitespace special handling.
The issue was noticed by Ray Lehtiniemi.
For good measure, this commit adds a test.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When whitespace or whitespace change was ignored, the function
xdl_recmatch() returned memcmp() style differences, which is wrong,
since it should return 0 on non-match.
Also, there were three horrible off-by-one bugs, even leading to wrong
hashes in the whitespace special handling.
The issue was noticed by Ray Lehtiniemi.
For good measure, this commit adds a test.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/t4015-diff-whitespace.sh | [new file with mode: 0755] | blob |
xdiff/xutils.c | diff | blob | history |