if (!refs)
return 0;
- iter = files_ref_iterator_begin(submodule, prefix, flags);
+ iter = files_ref_iterator_begin(refs, prefix, flags);
iter = prefix_ref_iterator_begin(iter, prefix, trim);
return do_for_each_ref_iterator(iter, fn, cb_data);
};
struct ref_iterator *files_ref_iterator_begin(
- const char *submodule,
+ struct ref_store *ref_store,
const char *prefix, unsigned int flags)
{
struct files_ref_store *refs =
- get_files_ref_store(submodule, "ref_iterator_begin");
+ files_downcast(ref_store, 1, "ref_iterator_begin");
struct ref_dir *loose_dir, *packed_dir;
struct ref_iterator *loose_iter, *packed_iter;
struct files_ref_iterator *iter;
const char *prefix,
int trim);
+struct ref_store;
+
/*
* Iterate over the packed and loose references in the specified
- * submodule that are within find_containing_dir(prefix). If prefix is
+ * ref_store that are within find_containing_dir(prefix). If prefix is
* NULL or the empty string, iterate over all references in the
* submodule.
*/
-struct ref_iterator *files_ref_iterator_begin(const char *submodule,
+struct ref_iterator *files_ref_iterator_begin(struct ref_store *ref_store,
const char *prefix,
unsigned int flags);
int do_for_each_ref_iterator(struct ref_iterator *iter,
each_ref_fn fn, void *cb_data);
-struct ref_store;
-
/* refs backends */
/*