summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/apply.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 06a76f2..ecb1f7a 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -57,20 +57,20 @@ static int parse_whitespace_option(struct apply_state *state, const char *option
return error(_("unrecognized whitespace option '%s'"), option);
}
-static void parse_ignorewhitespace_option(struct apply_state *state,
- const char *option)
+static int parse_ignorewhitespace_option(struct apply_state *state,
+ const char *option)
{
if (!option || !strcmp(option, "no") ||
!strcmp(option, "false") || !strcmp(option, "never") ||
!strcmp(option, "none")) {
state->ws_ignore_action = ignore_ws_none;
- return;
+ return 0;
}
if (!strcmp(option, "change")) {
state->ws_ignore_action = ignore_ws_change;
- return;
+ return 0;
}
- die(_("unrecognized whitespace ignore option '%s'"), option);
+ return error(_("unrecognized whitespace ignore option '%s'"), option);
}
static void set_default_whitespace_mode(struct apply_state *state)
@@ -4629,8 +4629,8 @@ static void init_apply_state(struct apply_state *state,
git_apply_config();
if (apply_default_whitespace && parse_whitespace_option(state, apply_default_whitespace))
exit(1);
- if (apply_default_ignorewhitespace)
- parse_ignorewhitespace_option(state, apply_default_ignorewhitespace);
+ if (apply_default_ignorewhitespace && parse_ignorewhitespace_option(state, apply_default_ignorewhitespace))
+ exit(1);
}
static void clear_apply_state(struct apply_state *state)