]> git.ipfire.org Git - thirdparty/git.git/commit
odb: introduce mtime fields for object info requests
authorPatrick Steinhardt <ps@pks.im>
Thu, 15 Jan 2026 11:04:40 +0000 (12:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jan 2026 13:50:29 +0000 (05:50 -0800)
commit16a2043a679578145672bfb311b24ca2db98ec31
tree4e8e18fdb85eb5bde6948cd3654b146b4ec64c8d
parentfe718f8e9804e623e91f54382f0ae1599e0b3825
odb: introduce mtime fields for object info requests

There are some use cases where we need to figure out the mtime for
objects. Most importantly, this is the case when we want to prune
unreachable objects. But getting at that data requires users to manually
derive the info either via the loose object's mtime, the packfiles'
mtime or via the ".mtimes" file.

Introduce a new `struct object_info::mtimep` pointer that allows callers
to request an object's mtime. This new field will be used in a
subsequent commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
object-file.c
odb.c
odb.h
packfile.c