]> git.ipfire.org Git - thirdparty/git.git/commit
refs/reftable: extract code from the transaction preparation
authorKarthik Nayak <karthik.188@gmail.com>
Tue, 8 Apr 2025 08:51:08 +0000 (10:51 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Apr 2025 14:57:19 +0000 (07:57 -0700)
commitca89c18d5cac11ca965b0f5088262c7b6210c572
treeea9ae06509675f30fcb8d6b75bcc7c5455c6422a
parent4dfcf18089be03d70dd4a0437bb40af156062738
refs/reftable: extract code from the transaction preparation

Extract the core logic for preparing individual reference updates from
`reftable_be_transaction_prepare()` into `prepare_single_update()`. This
dedicated function now handles all validation and preparation steps for
each reference update in the transaction, including object ID
verification, HEAD reference handling, and symref processing.

The refactoring consolidates all reference update validation into a
single logical block, which improves code maintainability and
readability. More importantly, this restructuring lays the groundwork
for implementing batched reference update support in the reftable
backend, which will be introduced in a followup commit.

No functional changes are included in this commit - it is purely a code
reorganization to support future enhancements.

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/reftable-backend.c