aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-07-07 12:29:09 -0700
committerJunio C Hamano <gitster@pobox.com>2007-07-07 12:29:09 -0700
commit0707a9d6f200bbafc02d13dd7f2c12bb795999f6 (patch)
tree579501f90e8b0a2d46480df695a01f5d5e90aacf /builtin-apply.c
parent4d3f4b80e49275c7eaf6ba0dbddd6180957926b9 (diff)
parent5fda48d67c82e07950e0b0c21cd8c97daefd7be0 (diff)
downloadgit-0707a9d6f200bbafc02d13dd7f2c12bb795999f6.tar.gz
git-0707a9d6f200bbafc02d13dd7f2c12bb795999f6.tar.xz
Merge branch 'maint'
* maint: Fix "apply --reverse" with regard to whitespace
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index c6f736c14..0a0b4a9e3 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -1003,12 +1003,16 @@ static int parse_fragment(char *line, unsigned long size, struct patch *patch, s
trailing++;
break;
case '-':
+ if (apply_in_reverse &&
+ new_whitespace != nowarn_whitespace)
+ check_whitespace(line, len);
deleted++;
oldlines--;
trailing = 0;
break;
case '+':
- if (new_whitespace != nowarn_whitespace)
+ if (!apply_in_reverse &&
+ new_whitespace != nowarn_whitespace)
check_whitespace(line, len);
added++;
newlines--;