[PATCH 2/2] builtin-apply: stronger indent-with-on-tab fixing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 builtin-apply.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/builtin-apply.c b/builtin-apply.c
index bd94a4b..5e3b4a1 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
-- 
1.5.4.rc0.44.g21147

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux