| 1740 | } |
| 1741 | |
| 1742 | static void add_cache_tree(struct cache_tree *it, struct rev_info *revs, |
| 1743 | struct strbuf *path, unsigned int flags) |
| 1744 | { |
| 1745 | size_t baselen = path->len; |
| 1746 | int i; |
| 1747 | |
| 1748 | if (it->entry_count >= 0) { |
| 1749 | struct tree *tree = lookup_tree(revs->repo, &it->oid); |
| 1750 | tree->object.flags |= flags; |
| 1751 | add_pending_object_with_path(revs, &tree->object, "", |
| 1752 | 040000, path->buf); |
| 1753 | } |
| 1754 | |
| 1755 | for (i = 0; i < it->subtree_nr; i++) { |
| 1756 | struct cache_tree_sub *sub = it->down[i]; |
| 1757 | strbuf_addf(path, "%s%s", baselen ? "/" : "", sub->name); |
| 1758 | add_cache_tree(sub->cache_tree, revs, path, flags); |
| 1759 | strbuf_setlen(path, baselen); |
| 1760 | } |
| 1761 | |
| 1762 | } |
| 1763 | |
| 1764 | static void add_resolve_undo_to_pending(struct index_state *istate, struct rev_info *revs) |
| 1765 | { |
no test coverage detected