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

Function unlink_entry

entry.c:594–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592}
593
594void unlink_entry(const struct cache_entry *ce, const char *super_prefix)
595{
596 const struct submodule *sub = submodule_from_ce(ce);
597 if (sub) {
598 /* state.force is set at the caller. */
599 submodule_move_head(ce->name, super_prefix, "HEAD", NULL,
600 SUBMODULE_MOVE_HEAD_FORCE);
601 }
602 if (check_leading_path(ce->name, ce_namelen(ce), 1) >= 0)
603 return;
604 if (remove_or_warn(ce->ce_mode, ce->name))
605 return;
606 schedule_dir_for_removal(ce->name, ce_namelen(ce));
607}
608
609int remove_or_warn(unsigned int mode, const char *file)
610{

Callers 3

checkout_entry_caFunction · 0.85
check_updatesFunction · 0.85
checkout_stageFunction · 0.85

Calls 5

submodule_from_ceFunction · 0.85
submodule_move_headFunction · 0.85
check_leading_pathFunction · 0.85
remove_or_warnFunction · 0.85
schedule_dir_for_removalFunction · 0.85

Tested by

no test coverage detected