MCPcopy Index your code
hub / github.com/git/git / has_object_kept_pack

Function has_object_kept_pack

packfile.c:2288–2308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2286}
2287
2288int 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
2310int for_each_object_in_pack(struct packed_git *p,
2311 each_packed_object_fn cb, void *data,

Callers 5

want_recent_objectFunction · 0.85
get_commit_actionFunction · 0.85
want_found_objectFunction · 0.85
cruft_include_check_objFunction · 0.85

Calls 3

fill_pack_entryFunction · 0.70

Tested by

no test coverage detected