[PATCH 3/3] git-apply --whitespace=nowarn
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 28, 2006, 01:13 UTC
- Message-ID
- <7v4q2kuvxk.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <7vhd6kxuea.fsf@assigned-by-dhcp.cox.net>
Andrew insists --whitespace=warn should be the default, and I tend to agree. This introduces --whitespace=warn, so if your project policy is more lenient, you can squelch them by having apply.whitespace=nowarn in your configuration file.
Signed-off-by: Junio C Hamano <junkio@cox.net>
--- * Not in "next" but will be shortly.
apply.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
114b085dd7b82c3ca74760c896e86c425127cf76
diff --git a/apply.c b/apply.c index a5cdd8e..d5cb5b1 100644 --- a/apply.c +++ b/apply.c @@ -39,7 +39,7 @@ static enum whitespace_eol { warn_on_whitespace, error_on_whitespace, strip_whitespace, -} new_whitespace = nowarn_whitespace; +} new_whitespace = warn_on_whitespace; static int whitespace_error = 0; static int squelch_whitespace_errors = 5; static int applied_after_stripping = 0; @@ -55,6 +55,10 @@ static void parse_whitespace_option(cons new_whitespace = warn_on_whitespace; return; } + if (!strcmp(option, "nowarn")) { + new_whitespace = nowarn_whitespace; + return; + } if (!strcmp(option, "error")) { new_whitespace = error_on_whitespace; return;
-- 1.2.3.gbfea