aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2007-12-16 12:58:02 -0500
committerJunio C Hamano <gitster@pobox.com>2007-12-16 14:03:40 -0800
commitb90ced0f7da0b8dcdac1aabd8840a23daef25b43 (patch)
treea1e9c79a46d6cc86b8343ef1afa038aa4058bb3e /builtin-apply.c
parent95f9b92700585eb9afa6978c350dc07ec5769ec6 (diff)
downloadgit-b90ced0f7da0b8dcdac1aabd8840a23daef25b43.tar.gz
git-b90ced0f7da0b8dcdac1aabd8840a23daef25b43.tar.xz
builtin-apply: stronger indent-with-on-tab fixing
Fix any sequence of 8 spaces in initial indent, not just the case where the 8 spaces are the first thing on the line. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index bd94a4bdb..5e3b4a144 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -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