Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-apply --whitespace=nowarn
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:36:00 +0000
(17:36 -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>
apply.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
383e20b
)
diff --git
a/apply.c
b/apply.c
index 4748d7f819aa82c1ce8d3808c7edee3bbbdba871..af9900ff1e8281e9a1d1c4b2ec98e6408ae49027 100644
(file)
--- a/
apply.c
+++ b/
apply.c
@@
-39,7
+39,7
@@
static enum whitespace_eol {
warn_on_whitespace,
error_on_whitespace,
strip_whitespace,
warn_on_whitespace,
error_on_whitespace,
strip_whitespace,
-} new_whitespace =
nowar
n_whitespace;
+} new_whitespace =
warn_o
n_whitespace;
static int whitespace_error = 0;
static int squelch_whitespace_errors = 5;
static int applied_after_stripping = 0;
static int whitespace_error = 0;
static int squelch_whitespace_errors = 5;
static int applied_after_stripping = 0;
@@
-48,13
+48,17
@@
static const char *patch_input_file = NULL;
static void parse_whitespace_option(const char *option)
{
if (!option) {
static void parse_whitespace_option(const char *option)
{
if (!option) {
- new_whitespace =
nowar
n_whitespace;
+ new_whitespace =
warn_o
n_whitespace;
return;
}
if (!strcmp(option, "warn")) {
new_whitespace = warn_on_whitespace;
return;
}
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;
if (!strcmp(option, "error")) {
new_whitespace = error_on_whitespace;
return;