| 1706 | } |
| 1707 | |
| 1708 | static 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 |
no test coverage detected