| 730 | } |
| 731 | |
| 732 | static int switch_cache_bottom(struct traverse_info *info) |
| 733 | { |
| 734 | struct unpack_trees_options *o = info->data; |
| 735 | int ret, pos; |
| 736 | |
| 737 | if (o->diff_index_cached) |
| 738 | return 0; |
| 739 | ret = o->internal.cache_bottom; |
| 740 | pos = find_cache_pos(info->prev, info->name, info->namelen); |
| 741 | |
| 742 | if (pos < -1) |
| 743 | o->internal.cache_bottom = -2 - pos; |
| 744 | else if (pos < 0) |
| 745 | o->internal.cache_bottom = o->src_index->cache_nr; |
| 746 | return ret; |
| 747 | } |
| 748 | |
| 749 | static inline int are_same_oid(struct name_entry *name_j, struct name_entry *name_k) |
| 750 | { |
no test coverage detected