summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-07-17 11:32:13 +0200
committerJunio C Hamano <gitster@pobox.com>2026-07-18 19:03:48 -0700
commit8d9135dce3be50c961f23f5e89352b0fd1d61117 (patch)
tree58a0e4dd9e7925c5ad7b4fe2e0d77804f94064a7 /t/t4013/diff.diff_initial..side
parentb688086b8fd56e1bbab36e6bb26e12844e6e6965 (diff)
odb: support setting mtime when writing objects
The function `force_object_loose()` is used to loosen packed objects before repacking. It passes the pack's mtime along so that the newly written loose object inherits the same timestamp. This matters for object pruning, which uses the mtime to determine whether an object is old enough to be pruned. In a subsequent commit, `force_object_loose()` will be converted to use the generic `odb_source_write_object()` interface instead of calling `write_loose_object()` directly. But the generic interface doesn't yet support setting a specific mtime, which makes it impossible to implement the logic as of now. Prepare for the change by introducing a new `mtime` parameter to this function that we plumb through the stack. If set, the backends are instructed to set the object's mtime accordingly. If unset, the backends are expected to use the current time instead. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions