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

Function want_object_in_pack_one

builtin/pack-objects.c:1708–1732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1706}
1707
1708static int want_object_in_pack_one(struct packed_git *p,
1709 const struct object_id *oid,
1710 int exclude,
1711 struct packed_git **found_pack,
1712 off_t *found_offset,
1713 uint32_t found_mtime)
1714{
1715 off_t offset;
1716
1717 if (p == *found_pack)
1718 offset = *found_offset;
1719 else
1720 offset = find_pack_entry_one(oid, p);
1721
1722 if (offset) {
1723 if (!*found_pack) {
1724 if (!is_pack_valid(p))
1725 return -1;
1726 *found_offset = offset;
1727 *found_pack = p;
1728 }
1729 return want_found_object(oid, exclude, p, found_mtime);
1730 }
1731 return -1;
1732}
1733
1734/*
1735 * Check whether we want the object in the pack (e.g., we do not want

Callers 1

Calls 3

find_pack_entry_oneFunction · 0.85
is_pack_validFunction · 0.85
want_found_objectFunction · 0.85

Tested by

no test coverage detected