object-file: rename transaction functions

In a subsequent commit, ODB transactions are made more generic to facilitate each ODB source providing its own transaction handling. Rename `object_file_transaction_{begin,commit}()` to `odb_transaction_files_{begin,commit}()` to better match the future source specific transaction implementation. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Justin Tobler committed Feb 2, 2026 at 18:10 UTC 8bf06d05a581dfb552cd0e290680f75d3676eb1d
3 files changed +8 -8
object-file.c
+3 -3
@@ -723,7 +723,7 @@ static void prepare_loose_object_transaction(struct odb_transaction *transaction
723 * We lazily create the temporary object directory
724 * the first time an object might be added, since
725 * callers may not know whether any objects will be
726 - * added at the time they call object_file_transaction_begin.
726 + * added at the time they call odb_transaction_files_begin.
727 */
728 if (!transaction || transaction->objdir)
729 return;
@@ -1985,7 +1985,7 @@ out:
1985 return ret;
1986 }
1987
1988 -struct odb_transaction *object_file_transaction_begin(struct odb_source *source)
1988 +struct odb_transaction *odb_transaction_files_begin(struct odb_source *source)
1989 {
1990 struct object_database *odb = source->odb;
1991
@@ -1998,7 +1998,7 @@ struct odb_transaction *object_file_transaction_begin(struct odb_source *source)
1998 return odb->transaction;
1999 }
2000
2001 -void object_file_transaction_commit(struct odb_transaction *transaction)
2001 +void odb_transaction_files_commit(struct odb_transaction *transaction)
2002 {
2003 if (!transaction)
2004 return;
object-file.h
+3 -3
@@ -202,16 +202,16 @@ struct odb_transaction;
202
203 /*
204 * Tell the object database to optimize for adding
205 - * multiple objects. object_file_transaction_commit must be called
205 + * multiple objects. odb_transaction_files_commit must be called
206 * to make new objects visible. If a transaction is already
207 * pending, NULL is returned.
208 */
209 -struct odb_transaction *object_file_transaction_begin(struct odb_source *source);
209 +struct odb_transaction *odb_transaction_files_begin(struct odb_source *source);
210
211 /*
212 * Tell the object database to make any objects from the
213 * current transaction visible.
214 */
215 -void object_file_transaction_commit(struct odb_transaction *transaction);
215 +void odb_transaction_files_commit(struct odb_transaction *transaction);
216
217 #endif /* OBJECT_FILE_H */
odb.c
+2 -2
@@ -1153,10 +1153,10 @@ void odb_reprepare(struct object_database *o)
1153
1154 struct odb_transaction *odb_transaction_begin(struct object_database *odb)
1155 {
1156 - return object_file_transaction_begin(odb->sources);
1156 + return odb_transaction_files_begin(odb->sources);
1157 }
1158
1159 void odb_transaction_commit(struct odb_transaction *transaction)
1160 {
1161 - object_file_transaction_commit(transaction);
1161 + odb_transaction_files_commit(transaction);
1162 }