| 2286 | } |
| 2287 | |
| 2288 | int has_object_kept_pack(struct repository *r, const struct object_id *oid, |
| 2289 | unsigned flags) |
| 2290 | { |
| 2291 | struct odb_source *source; |
| 2292 | struct pack_entry e; |
| 2293 | |
| 2294 | for (source = r->objects->sources; source; source = source->next) { |
| 2295 | struct odb_source_files *files = odb_source_files_downcast(source); |
| 2296 | struct packed_git **cache; |
| 2297 | |
| 2298 | cache = packfile_store_get_kept_pack_cache(files->packed, flags); |
| 2299 | |
| 2300 | for (; *cache; cache++) { |
| 2301 | struct packed_git *p = *cache; |
| 2302 | if (fill_pack_entry(oid, &e, p)) |
| 2303 | return 1; |
| 2304 | } |
| 2305 | } |
| 2306 | |
| 2307 | return 0; |
| 2308 | } |
| 2309 | |
| 2310 | int for_each_object_in_pack(struct packed_git *p, |
| 2311 | each_packed_object_fn cb, void *data, |
no test coverage detected