| 627 | } |
| 628 | |
| 629 | int remove_file_from_index(struct index_state *istate, const char *path) |
| 630 | { |
| 631 | int pos = index_name_pos(istate, path, strlen(path)); |
| 632 | if (pos < 0) |
| 633 | pos = -pos-1; |
| 634 | cache_tree_invalidate_path(istate, path); |
| 635 | untracked_cache_remove_from_index(istate, path); |
| 636 | while (pos < istate->cache_nr && !strcmp(istate->cache[pos]->name, path)) |
| 637 | remove_index_entry_at(istate, pos); |
| 638 | return 0; |
| 639 | } |
| 640 | |
| 641 | static int compare_name(struct cache_entry *ce, const char *path, int namelen) |
| 642 | { |
no test coverage detected