do_for_each_entry_in_dir(): delete function
Its only remaining caller was itself. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
50c2d8555b
commit
f890db83ee
@ -316,27 +316,6 @@ static void sort_ref_dir(struct ref_dir *dir)
|
|||||||
dir->sorted = dir->nr = i;
|
dir->sorted = dir->nr = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_for_each_entry_in_dir(struct ref_dir *dir,
|
|
||||||
each_ref_entry_fn fn, void *cb_data)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
assert(dir->sorted == dir->nr);
|
|
||||||
for (i = 0; i < dir->nr; i++) {
|
|
||||||
struct ref_entry *entry = dir->entries[i];
|
|
||||||
int retval;
|
|
||||||
if (entry->flag & REF_DIR) {
|
|
||||||
struct ref_dir *subdir = get_ref_dir(entry);
|
|
||||||
sort_ref_dir(subdir);
|
|
||||||
retval = do_for_each_entry_in_dir(subdir, fn, cb_data);
|
|
||||||
} else {
|
|
||||||
retval = fn(entry, cb_data);
|
|
||||||
}
|
|
||||||
if (retval)
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Load all of the refs from `dir` (recursively) into our in-memory
|
* Load all of the refs from `dir` (recursively) into our in-memory
|
||||||
* cache.
|
* cache.
|
||||||
|
@ -251,17 +251,6 @@ struct ref_iterator *cache_ref_iterator_begin(struct ref_cache *cache,
|
|||||||
const char *prefix,
|
const char *prefix,
|
||||||
int prime_dir);
|
int prime_dir);
|
||||||
|
|
||||||
typedef int each_ref_entry_fn(struct ref_entry *entry, void *cb_data);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Call `fn` for each reference in `dir`. Recurse into subdirectories,
|
|
||||||
* sorting them before iterating. This function does not sort `dir`
|
|
||||||
* itself; it should be sorted beforehand. `fn` is called for all
|
|
||||||
* references, including broken ones.
|
|
||||||
*/
|
|
||||||
int do_for_each_entry_in_dir(struct ref_dir *dir,
|
|
||||||
each_ref_entry_fn fn, void *cb_data);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Peel the entry (if possible) and return its new peel_status. If
|
* Peel the entry (if possible) and return its new peel_status. If
|
||||||
* repeel is true, re-peel the entry even if there is an old peeled
|
* repeel is true, re-peel the entry even if there is an old peeled
|
||||||
|
Loading…
x
Reference in New Issue
Block a user