Skip to content

Commit

Permalink
git-apply --whitespace=nowarn
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Feb 28, 2006
1 parent 2ae1c53 commit 621603b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -48,13 +48,17 @@ static const char *patch_input_file = NULL;
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;
Expand Down

0 comments on commit 621603b

Please sign in to comment.