mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
cache,tree: move cmp_cache_name_compare from tree.[ch] to read-cache.c
Since cmp_cache_name_compare() was comparing cache_entry structs, it was associated with the cache rather than with trees. Move the function. As a side effect, we can make cache_name_stage_compare() static as well. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d1cbe1e6d8
commit
aabc5617cd
10
tree.c
10
tree.c
@@ -94,16 +94,6 @@ int read_tree(struct repository *r,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int cmp_cache_name_compare(const void *a_, const void *b_)
|
||||
{
|
||||
const struct cache_entry *ce1, *ce2;
|
||||
|
||||
ce1 = *((const struct cache_entry **)a_);
|
||||
ce2 = *((const struct cache_entry **)b_);
|
||||
return cache_name_stage_compare(ce1->name, ce1->ce_namelen, ce_stage(ce1),
|
||||
ce2->name, ce2->ce_namelen, ce_stage(ce2));
|
||||
}
|
||||
|
||||
struct tree *lookup_tree(struct repository *r, const struct object_id *oid)
|
||||
{
|
||||
struct object *obj = lookup_object(r, oid);
|
||||
|
||||
Reference in New Issue
Block a user