Merge branch 'maint' of git://repo.or.cz/git-gui into maint
[gitweb.git] / builtin-apply.c
index 0399743c4e2288a0812faeea92c07a5f6a13fccc..490e23ef40c2b2d16272c67a67a14a1eb03b3877 100644 (file)
@@ -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--;