Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-12-03 21:25:34 +0300
committerJunio C Hamano <junkio@cox.net>2006-12-05 03:30:54 +0300
commitc7c24889bb694f93a12f41a28fab26d30e571c17 (patch)
tree44d4ce6aeda68a63f4bcde207268e66f8629cc5e /xdiff/xutils.c
parentba988a83f0cfdafdcfdc7ed44253840ea83578fb (diff)
diff -b: ignore whitespace at end of line
This is _not_ the same as "treat eol as whitespace", since that would mean that multiple empty lines would be treated as equal to e.g. a space. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'xdiff/xutils.c')
-rw-r--r--xdiff/xutils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xdiff/xutils.c b/xdiff/xutils.c
index 9e4bb47ee9..1b899f32c4 100644
--- a/xdiff/xutils.c
+++ b/xdiff/xutils.c
@@ -230,7 +230,8 @@ unsigned long xdl_hash_record(char const **data, char const *top, long flags) {
while (ptr + 1 < top && isspace(ptr[1])
&& ptr[1] != '\n')
ptr++;
- if (flags & XDF_IGNORE_WHITESPACE_CHANGE) {
+ if (flags & XDF_IGNORE_WHITESPACE_CHANGE
+ && ptr[1] != '\n') {
ha += (ha << 5);
ha ^= (unsigned long) ' ';
}