summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2ae1c53)
raw | patch | inline | side by side (parent: 2ae1c53)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 28 Feb 2006 01:07:16 +0000 (17:07 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 28 Feb 2006 01:34:26 +0000 (17:34 -0800) |
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>
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>
apply.c | patch | blob | history |
index a5cdd8e2634500e9515afab8171897a4ccdac8f3..c4ff41800bd519574471e3401030fd6767793ac0 100644 (file)
--- a/apply.c
+++ b/apply.c
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;
static void parse_whitespace_option(const char *option)
{
if (!option) {
- new_whitespace = nowarn_whitespace;
+ new_whitespace = warn_on_whitespace;
return;
}
if (!strcmp(option, "warn")) {
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;