| 2673 | } |
| 2674 | |
| 2675 | static 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 | |
| 2695 | static int keep_entry(const struct cache_entry *ce, |
| 2696 | struct unpack_trees_options *o) |
no test coverage detected