| 3496 | } |
| 3497 | |
| 3498 | static struct patch *previous_patch(struct apply_state *state, |
| 3499 | struct patch *patch, |
| 3500 | int *gone) |
| 3501 | { |
| 3502 | struct patch *previous; |
| 3503 | |
| 3504 | *gone = 0; |
| 3505 | if (patch->is_copy || patch->is_rename) |
| 3506 | return NULL; /* "git" patches do not depend on the order */ |
| 3507 | |
| 3508 | previous = in_fn_table(state, patch->old_name); |
| 3509 | if (!previous) |
| 3510 | return NULL; |
| 3511 | |
| 3512 | if (to_be_deleted(previous)) |
| 3513 | return NULL; /* the deletion hasn't happened yet */ |
| 3514 | |
| 3515 | if (was_deleted(previous)) |
| 3516 | *gone = 1; |
| 3517 | |
| 3518 | return previous; |
| 3519 | } |
| 3520 | |
| 3521 | static int verify_index_match(struct apply_state *state, |
| 3522 | const struct cache_entry *ce, |
no test coverage detected