* We call unpack_index_entry() with an unmerged cache entry * only in diff-index, and it wants a single callback. Skip * the other unmerged entry with the same name. */
| 649 | * the other unmerged entry with the same name. |
| 650 | */ |
| 651 | static void mark_ce_used_same_name(struct cache_entry *ce, |
| 652 | struct unpack_trees_options *o) |
| 653 | { |
| 654 | struct index_state *index = o->src_index; |
| 655 | int len = ce_namelen(ce); |
| 656 | int pos; |
| 657 | |
| 658 | for (pos = locate_in_src_index(ce, o); pos < index->cache_nr; pos++) { |
| 659 | struct cache_entry *next = index->cache[pos]; |
| 660 | if (len != ce_namelen(next) || |
| 661 | memcmp(ce->name, next->name, len)) |
| 662 | break; |
| 663 | mark_ce_used(next, o); |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | static struct cache_entry *next_cache_entry(struct unpack_trees_options *o) |
| 668 | { |
no test coverage detected