| 1328 | } |
| 1329 | |
| 1330 | static int check_header_line(int linenr, struct patch *patch) |
| 1331 | { |
| 1332 | int extensions = (patch->is_delete == 1) + (patch->is_new == 1) + |
| 1333 | (patch->is_rename == 1) + (patch->is_copy == 1); |
| 1334 | if (extensions > 1) |
| 1335 | return error(_("inconsistent header lines %d and %d"), |
| 1336 | patch->extension_linenr, linenr); |
| 1337 | if (extensions && !patch->extension_linenr) |
| 1338 | patch->extension_linenr = linenr; |
| 1339 | return 0; |
| 1340 | } |
| 1341 | |
| 1342 | int parse_git_diff_header(struct strbuf *root, |
| 1343 | const char *patch_input_file, |
no test coverage detected