/* Other non boolean parameters */
const char *fake_ancestor;
int line_termination;
+ unsigned int p_context;
};
static int newfd = -1;
static int state_p_value = 1;
static int p_value_known;
static int apply = 1;
-static unsigned int p_context = UINT_MAX;
static const char * const apply_usage[] = {
N_("git apply [<options>] [<patch>...]"),
NULL
break;
/* Am I at my context limits? */
- if ((leading <= p_context) && (trailing <= p_context))
+ if ((leading <= state->p_context) && (trailing <= state->p_context))
break;
if (match_beginning || match_end) {
match_beginning = match_end = 0;
state->prefix = prefix;
state->prefix_length = state->prefix ? strlen(state->prefix) : 0;
state->line_termination = '\n';
+ state->p_context = UINT_MAX;
git_apply_config();
if (apply_default_whitespace)
/* Think twice before adding "--nul" synonym to this */
OPT_SET_INT('z', NULL, &state.line_termination,
N_("paths are separated with NUL character"), '\0'),
- OPT_INTEGER('C', NULL, &p_context,
+ OPT_INTEGER('C', NULL, &state.p_context,
N_("ensure at least <n> lines of context match")),
{ OPTION_CALLBACK, 0, "whitespace", &whitespace_option, N_("action"),
N_("detect new or modified lines that have whitespace errors"),