MCPcopy Create free account
hub / github.com/git/git / deleted_entry

Function deleted_entry

unpack-trees.c:2675–2693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2673}
2674
2675static int deleted_entry(const struct cache_entry *ce,
2676 const struct cache_entry *old,
2677 struct unpack_trees_options *o)
2678{
2679 /* Did it exist in the index? */
2680 if (!old) {
2681 if (verify_absent(ce, ERROR_WOULD_LOSE_UNTRACKED_REMOVED, o))
2682 return -1;
2683 return 0;
2684 } else if (verify_absent_if_directory(ce, ERROR_WOULD_LOSE_UNTRACKED_REMOVED, o)) {
2685 return -1;
2686 }
2687
2688 if (!(old->ce_flags & CE_CONFLICTED) && verify_uptodate(old, o))
2689 return -1;
2690 add_entry(o, ce, CE_REMOVE, 0);
2691 invalidate_ce_path(ce, o);
2692 return 1;
2693}
2694
2695static int keep_entry(const struct cache_entry *ce,
2696 struct unpack_trees_options *o)

Callers 3

threeway_mergeFunction · 0.85
twoway_mergeFunction · 0.85
oneway_mergeFunction · 0.85

Calls 5

verify_absentFunction · 0.85
verify_uptodateFunction · 0.85
invalidate_ce_pathFunction · 0.85
add_entryFunction · 0.70

Tested by

no test coverage detected