diff options
author | Derrick Stolee <derrickstolee@github.com> | 2022-06-16 13:13:50 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-16 18:59:56 (GMT) |
commit | 86aa250aa871a4d8314f1f51ee007e93a9461e1e (patch) | |
tree | e7b1433d32e48e991bb0e479a22c6e269f7d070d /cache-tree.c | |
parent | 82db195e1be63cfa274c26351ef782b2df0a21fd (diff) | |
download | git-86aa250aa871a4d8314f1f51ee007e93a9461e1e.zip git-86aa250aa871a4d8314f1f51ee007e93a9461e1e.tar.gz git-86aa250aa871a4d8314f1f51ee007e93a9461e1e.tar.bz2 |
cache-tree: remove cache_tree_find_path()
This reverts 080ab56a46 (cache-tree: implement cache_tree_find_path(),
2022-05-23). The cache_tree_find_path() method was never actually called
in the topic that added it. I cannot find any reference to it in any of
my forks, so this appears to not be needed at the moment.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache-tree.c')
-rw-r--r-- | cache-tree.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/cache-tree.c b/cache-tree.c index ff794d9..56db0b5 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -101,33 +101,6 @@ struct cache_tree_sub *cache_tree_sub(struct cache_tree *it, const char *path) return find_subtree(it, path, pathlen, 1); } -struct cache_tree *cache_tree_find_path(struct cache_tree *it, const char *path) -{ - const char *slash; - int namelen; - struct cache_tree_sub it_sub = { - .cache_tree = it, - }; - struct cache_tree_sub *down = &it_sub; - - while (down) { - slash = strchrnul(path, '/'); - namelen = slash - path; - down->cache_tree->entry_count = -1; - if (!*slash) { - int pos; - pos = cache_tree_subtree_pos(down->cache_tree, path, namelen); - if (0 <= pos) - return down->cache_tree->down[pos]->cache_tree; - return NULL; - } - down = find_subtree(it, path, namelen, 0); - path = slash + 1; - } - - return NULL; -} - static int do_invalidate_path(struct cache_tree *it, const char *path) { /* a/b/c |