return r;
}
-int for_each_loose_file_in_objdir_buf(struct strbuf *path,
- each_loose_object_fn obj_cb,
- each_loose_cruft_fn cruft_cb,
- each_loose_subdir_fn subdir_cb,
- void *data)
-{
- int r = 0;
- int i;
-
- for (i = 0; i < 256; i++) {
- r = for_each_file_in_obj_subdir(i, path, the_repository->hash_algo,
- obj_cb, cruft_cb,
- subdir_cb, data);
- if (r)
- break;
- }
-
- return r;
-}
-
int for_each_loose_file_in_objdir(const char *path,
each_loose_object_fn obj_cb,
each_loose_cruft_fn cruft_cb,
int r;
strbuf_addstr(&buf, path);
- r = for_each_loose_file_in_objdir_buf(&buf, obj_cb, cruft_cb,
- subdir_cb, data);
- strbuf_release(&buf);
+ for (int i = 0; i < 256; i++) {
+ r = for_each_file_in_obj_subdir(i, &buf, the_repository->hash_algo,
+ obj_cb, cruft_cb,
+ subdir_cb, data);
+ if (r)
+ break;
+ }
+ strbuf_release(&buf);
return r;
}
each_loose_cruft_fn cruft_cb,
each_loose_subdir_fn subdir_cb,
void *data);
-int for_each_loose_file_in_objdir_buf(struct strbuf *path,
- each_loose_object_fn obj_cb,
- each_loose_cruft_fn cruft_cb,
- each_loose_subdir_fn subdir_cb,
- void *data);
/*
* Iterate over all accessible loose objects without respect to