{
if (!option || !strcmp(option, "no") ||
!strcmp(option, "false") || !strcmp(option, "never") ||
!strcmp(option, "none")) {
{
if (!option || !strcmp(option, "no") ||
!strcmp(option, "false") || !strcmp(option, "never") ||
!strcmp(option, "none")) {
* fuzzy matching. We collect all the line length information because
* we need it to adjust whitespace if we match.
*/
* fuzzy matching. We collect all the line length information because
* we need it to adjust whitespace if we match.
*/
return line_by_line_fuzzy_match(img, preimage, postimage,
try, try_lno, preimage_limit);
return line_by_line_fuzzy_match(img, preimage, postimage,
try, try_lno, preimage_limit);
state->p_context = UINT_MAX;
state->squelch_whitespace_errors = 5;
state->ws_error_action = warn_on_ws_error;
state->p_context = UINT_MAX;
state->squelch_whitespace_errors = 5;
state->ws_error_action = warn_on_ws_error;
strbuf_init(&state->root, 0);
git_apply_config();
if (apply_default_whitespace)
parse_whitespace_option(state, apply_default_whitespace);
if (apply_default_ignorewhitespace)
strbuf_init(&state->root, 0);
git_apply_config();
if (apply_default_whitespace)
parse_whitespace_option(state, apply_default_whitespace);
if (apply_default_ignorewhitespace)
{ OPTION_CALLBACK, 0, "whitespace", &state, N_("action"),
N_("detect new or modified lines that have whitespace errors"),
0, option_parse_whitespace },
{ OPTION_CALLBACK, 0, "whitespace", &state, N_("action"),
N_("detect new or modified lines that have whitespace errors"),
0, option_parse_whitespace },
- { OPTION_CALLBACK, 0, "ignore-space-change", NULL, NULL,
+ { OPTION_CALLBACK, 0, "ignore-space-change", &state, NULL,
N_("ignore changes in whitespace when finding context"),
PARSE_OPT_NOARG, option_parse_space_change },
N_("ignore changes in whitespace when finding context"),
PARSE_OPT_NOARG, option_parse_space_change },
- { OPTION_CALLBACK, 0, "ignore-whitespace", NULL, NULL,
+ { OPTION_CALLBACK, 0, "ignore-whitespace", &state, NULL,
N_("ignore changes in whitespace when finding context"),
PARSE_OPT_NOARG, option_parse_space_change },
OPT_BOOL('R', "reverse", &state.apply_in_reverse,
N_("ignore changes in whitespace when finding context"),
PARSE_OPT_NOARG, option_parse_space_change },
OPT_BOOL('R', "reverse", &state.apply_in_reverse,