| 4405 | } |
| 4406 | |
| 4407 | static void patch_stats(struct apply_state *state, struct patch *patch) |
| 4408 | { |
| 4409 | int lines = patch->lines_added + patch->lines_deleted; |
| 4410 | |
| 4411 | if (lines > state->max_change) |
| 4412 | state->max_change = lines; |
| 4413 | if (patch->old_name) { |
| 4414 | int len = quote_c_style(patch->old_name, NULL, NULL, 0); |
| 4415 | if (!len) |
| 4416 | len = strlen(patch->old_name); |
| 4417 | if (len > state->max_len) |
| 4418 | state->max_len = len; |
| 4419 | } |
| 4420 | if (patch->new_name) { |
| 4421 | int len = quote_c_style(patch->new_name, NULL, NULL, 0); |
| 4422 | if (!len) |
| 4423 | len = strlen(patch->new_name); |
| 4424 | if (len > state->max_len) |
| 4425 | state->max_len = len; |
| 4426 | } |
| 4427 | } |
| 4428 | |
| 4429 | static int remove_file(struct apply_state *state, struct patch *patch, int rmdir_empty) |
| 4430 | { |
no test coverage detected