Commits

Anonymous committed 5c0d46e

git-apply --whitespace=nowarn

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>

  • Participants
  • Parent commits 383e20b

Comments (0)

Files changed (1)

 	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;