builtin-apply: stronger indent-with-on-tab fixing
[gitweb.git] / builtin-apply.c
index bd94a4bdb02cae54641cc56582c9b9155cdeb4dd..5e3b4a14470ba1e97d98dd1721d9d4f6c44d6dc8 100644 (file)
@@ -1587,8 +1587,7 @@ static int apply_line(char *output, const char *patch, int plen,
                } else if (ch == ' ') {
                        last_space_in_indent = i;
                        if ((ws_rule & WS_INDENT_WITH_NON_TAB) &&
-                           last_tab_in_indent <= 0 &&
-                           8 <= i)
+                           8 <= i - last_tab_in_indent)
                                need_fix_leading_space = 1;
                }
                else