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

Function remove_file

apply.c:4429–4441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4427}
4428
4429static int remove_file(struct apply_state *state, struct patch *patch, int rmdir_empty)
4430{
4431 if (state->update_index && !state->ita_only) {
4432 if (remove_file_from_index(state->repo->index, patch->old_name) < 0)
4433 return error(_("unable to remove %s from index"), patch->old_name);
4434 }
4435 if (!state->cached) {
4436 if (!remove_or_warn(patch->old_mode, patch->old_name) && rmdir_empty) {
4437 remove_path(patch->old_name);
4438 }
4439 }
4440 return 0;
4441}
4442
4443static int add_index_file(struct apply_state *state,
4444 const char *path,

Callers 1

write_out_one_resultFunction · 0.85

Calls 4

remove_file_from_indexFunction · 0.85
errorFunction · 0.85
remove_or_warnFunction · 0.85
remove_pathFunction · 0.85

Tested by

no test coverage detected