object-file: rename files transaction prepare function
The "files" ODB transaction backend lazily creates a temporary object directory when the first loose object is written to the transaction via `prepare_loose_object_transaction()`. In a subsequent commit, the temporary directory is used to also write packfiles to. Rename the function to `odb_transaction_files_prepare()` accordingly. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Justin Tobler committed
Jul 10, 2026 at 11:37 UTC
f065d5985c30d41d8d43ca86c299a311533691bc
1 file changed
+3
-3
object-file.c
+3
-3
@@ -499,7 +499,7 @@ struct odb_transaction_files {
499
struct transaction_packfile packfile;
500
};
501
502
-static void prepare_loose_object_transaction(struct odb_transaction *base)
502
+static void odb_transaction_files_prepare(struct odb_transaction *base)
503
{
504
struct odb_transaction_files *transaction =
505
container_of_or_null(base, struct odb_transaction_files, base);
@@ -760,7 +760,7 @@ int write_loose_object(struct odb_source_loose *loose,
760
static struct strbuf filename = STRBUF_INIT;
761
762
if (batch_fsync_enabled(FSYNC_COMPONENT_LOOSE_OBJECT))
763
- prepare_loose_object_transaction(loose->base.odb->transaction);
763
+ odb_transaction_files_prepare(loose->base.odb->transaction);
764
765
odb_loose_path(loose, &filename, oid);
766
@@ -824,7 +824,7 @@ int odb_source_loose_write_stream(struct odb_source_loose *loose,
824
int hdrlen;
825
826
if (batch_fsync_enabled(FSYNC_COMPONENT_LOOSE_OBJECT))
827
- prepare_loose_object_transaction(loose->base.odb->transaction);
827
+ odb_transaction_files_prepare(loose->base.odb->transaction);
828
829
/* Since oid is not determined, save tmp file to odb path. */
830
strbuf_addf(&filename, "%s/", loose->base.path);