Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cache-tree.c27
-rw-r--r--cache-tree.h2
2 files changed, 0 insertions, 29 deletions
diff --git a/cache-tree.c b/cache-tree.c
index ff794d940f..56db0b5026 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
diff --git a/cache-tree.h b/cache-tree.h
index f75f8e74dc..8efeccebfc 100644
--- a/cache-tree.h
+++ b/cache-tree.h
@@ -29,8 +29,6 @@ struct cache_tree_sub *cache_tree_sub(struct cache_tree *, const char *);
int cache_tree_subtree_pos(struct cache_tree *it, const char *path, int pathlen);
-struct cache_tree *cache_tree_find_path(struct cache_tree *it, const char *path);
-
void cache_tree_write(struct strbuf *, struct cache_tree *root);
struct cache_tree *cache_tree_read(const char *buffer, unsigned long size);