MCPcopy Create free account
hub / github.com/git/git / remove_nonexistent_theirs_shallow

Function remove_nonexistent_theirs_shallow

shallow.c:565–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563/* Step 4, remove non-existent ones in "theirs" after getting the pack */
564
565void remove_nonexistent_theirs_shallow(struct shallow_info *info)
566{
567 struct object_id *oid = info->shallow->oid;
568 size_t i, dst;
569 trace_printf_key(&trace_shallow, "shallow: remove_nonexistent_theirs_shallow\n");
570 for (i = dst = 0; i < info->nr_theirs; i++) {
571 if (i != dst)
572 info->theirs[dst] = info->theirs[i];
573 if (odb_has_object(the_repository->objects, oid + info->theirs[i],
574 ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR))
575 dst++;
576 }
577 info->nr_theirs = dst;
578}
579
580define_commit_slab(ref_bitmap, uint32_t *);
581

Callers 2

update_shallowFunction · 0.85
update_shallow_infoFunction · 0.85

Calls 1

odb_has_objectFunction · 0.85

Tested by

no test coverage detected