tree: enable cmp_cache_name_compare() to be used elsewhere

Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Dec 13, 2020 at 08:04 UTC 70912f66de751b2f1af145887dc64c9c0d06de36
2 files changed +3 -1
tree.c
+1 -1
@@ -144,7 +144,7 @@ int read_tree_recursive(struct repository *r,
144 return ret;
145 }
146
147 -static int cmp_cache_name_compare(const void *a_, const void *b_)
147 +int cmp_cache_name_compare(const void *a_, const void *b_)
148 {
149 const struct cache_entry *ce1, *ce2;
150
tree.h
+2
@@ -28,6 +28,8 @@ void free_tree_buffer(struct tree *tree);
28 /* Parses and returns the tree in the given ent, chasing tags and commits. */
29 struct tree *parse_tree_indirect(const struct object_id *oid);
30
31 +int cmp_cache_name_compare(const void *a_, const void *b_);
32 +
33 #define READ_TREE_RECURSIVE 1
34 typedef int (*read_tree_fn_t)(const struct object_id *, struct strbuf *, const char *, unsigned int, int, void *);
35