]> git.99rst.org Git - git.git/commit
packfile: use higher-level interface to implement `has_object_pack()`
authorPatrick Steinhardt <redacted>
Wed, 17 Jun 2026 06:39:51 +0000 (08:39 +0200)
committerJunio C Hamano <redacted>
Wed, 17 Jun 2026 12:00:00 +0000 (05:00 -0700)
commit77e175c6d03a26e97deb2a7bc707894eb45ced26
tree223fdc99110ef6f73c3db42a291aa006baede3f6
parent9ea4ef8586d8fa74bf45c1dd8da2256099abebbd
packfile: use higher-level interface to implement `has_object_pack()`

In `has_object_pack()` we're checking whether a specific object exists
as part of a packfile. This is done by calling the low-level function
`find_pack_entry()`, but this function will eventually be moved into
"odb/source-packed.c" and made file-local.

Refactor the code to use `packfile_store_read_object_info()` instead.
This refactoring is functionally equivalent as that function will call
`find_pack_entry()` itself and then return immediately when it ain't got
no object info pointer as parameter.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
packfile.c
git clone https://git.99rst.org/PROJECT