diff options
Diffstat (limited to 'apply.c')
-rw-r--r-- | apply.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1302,15 +1302,15 @@ static char *git_header_name(int p_value, } } -static int check_header_line(struct apply_state *state, struct patch *patch) +static int check_header_line(int linenr, struct patch *patch) { int extensions = (patch->is_delete == 1) + (patch->is_new == 1) + (patch->is_rename == 1) + (patch->is_copy == 1); if (extensions > 1) return error(_("inconsistent header lines %d and %d"), - patch->extension_linenr, state->linenr); + patch->extension_linenr, linenr); if (extensions && !patch->extension_linenr) - patch->extension_linenr = state->linenr; + patch->extension_linenr = linenr; return 0; } @@ -1380,7 +1380,7 @@ static int parse_git_header(struct apply_state *state, res = p->fn(state, line + oplen, patch); if (res < 0) return -1; - if (check_header_line(state, patch)) + if (check_header_line(state->linenr, patch)) return -1; if (res > 0) return offset; |