]> git.ipfire.org Git - thirdparty/git.git/commit
refs: add a `optimize_required` field to `struct ref_storage_be`
authorKarthik Nayak <karthik.188@gmail.com>
Sat, 8 Nov 2025 21:51:55 +0000 (22:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Nov 2025 17:28:48 +0000 (09:28 -0800)
commitf6c5ca387a7693b16158826d157178be0ba439dc
tree22414dc8c8c76b982258920622cc6646e8abe6fb
parente35155588aa9f0355eb7e116ea418c189479f62d
refs: add a `optimize_required` field to `struct ref_storage_be`

To allow users of the refs namespace to check if the reference backend
requires optimization, add a new field `optimize_required` field to
`struct ref_storage_be`. This field is of type `optimize_required_fn`
which is also introduced in this commit.

Modify the debug, files, packed and reftable backend to implement this
field. A following commit will expose this via 'git pack-refs' and 'git
refs optimize'.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs.h
refs/debug.c
refs/files-backend.c
refs/packed-backend.c
refs/refs-internal.h
refs/reftable-backend.c