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

Function has_object_pack

packfile.c:2272–2286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2270}
2271
2272int has_object_pack(struct repository *r, const struct object_id *oid)
2273{
2274 struct odb_source *source;
2275 struct pack_entry e;
2276
2277 odb_prepare_alternates(r->objects);
2278 for (source = r->objects->sources; source; source = source->next) {
2279 struct odb_source_files *files = odb_source_files_downcast(source);
2280 int ret = find_pack_entry(files->packed, oid, &e);
2281 if (ret)
2282 return ret;
2283 }
2284
2285 return 0;
2286}
2287
2288int has_object_kept_pack(struct repository *r, const struct object_id *oid,
2289 unsigned flags)

Callers 7

prune_objectFunction · 0.85
get_commit_actionFunction · 0.85
show_objectFunction · 0.85
reuse_worktree_fileFunction · 0.85
check_reachable_objectFunction · 0.85
count_looseFunction · 0.85

Calls 3

odb_prepare_alternatesFunction · 0.85
find_pack_entryFunction · 0.85

Tested by

no test coverage detected