MCPcopy Index your code
hub / github.com/git/git / previous_patch

Function previous_patch

apply.c:3498–3519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3496}
3497
3498static 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
3521static int verify_index_match(struct apply_state *state,
3522 const struct cache_entry *ce,

Callers 2

load_preimageFunction · 0.85
check_preimageFunction · 0.85

Calls 3

in_fn_tableFunction · 0.85
to_be_deletedFunction · 0.85
was_deletedFunction · 0.85

Tested by

no test coverage detected