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:
authorDerrick Stolee <dstolee@microsoft.com>2021-01-23 22:58:13 +0300
committerJunio C Hamano <gitster@pobox.com>2021-01-24 04:14:07 +0300
commitc80dd3967f28527dab49c8e9525524c7f33baa22 (patch)
treea52012f5fed36ff5c484daf759cce6e2d73de864 /cache-tree.h
parent8d87e338e16e022545638a0e9a3e15c6bdb56111 (diff)
cache-tree: extract subtree_pos()
This method will be helpful to use outside of cache-tree.c in a later feature. The implementation is subtle due to subtree_name_cmp() sorting by length and then lexicographically. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache-tree.h')
-rw-r--r--cache-tree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache-tree.h b/cache-tree.h
index 639bfa5340..8efeccebfc 100644
--- a/cache-tree.h
+++ b/cache-tree.h
@@ -27,6 +27,8 @@ void cache_tree_free(struct cache_tree **);
void cache_tree_invalidate_path(struct index_state *, const char *);
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);
+
void cache_tree_write(struct strbuf *, struct cache_tree *root);
struct cache_tree *cache_tree_read(const char *buffer, unsigned long size);