From: Junio C Hamano Date: Wed, 27 May 2026 05:15:45 +0000 (+0900) Subject: Merge branch 'jt/odb-transaction-write' X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=2f952b81ed2c44ebce3496d659a93d82a1a2f662;p=thirdparty%2Fgit.git Merge branch 'jt/odb-transaction-write' ODB transaction interface is being reworked to explicitly handle object writes. * jt/odb-transaction-write: odb/transaction: make `write_object_stream()` pluggable object-file: generalize packfile writes to use odb_write_stream object-file: avoid fd seekback by checking object size upfront object-file: remove flags from transaction packfile writes odb: update `struct odb_write_stream` read() callback odb/transaction: use pluggable `begin_transaction()` odb: split `struct odb_transaction` into separate header --- 2f952b81ed2c44ebce3496d659a93d82a1a2f662 diff --cc odb.h index 3a711f6547,6faeaa0589..9eb8355aca --- a/odb.h +++ b/odb.h @@@ -29,24 -31,10 +29,6 @@@ extern int fetch_if_missing */ char *compute_alternate_path(const char *path, struct strbuf *err); - /* - * A transaction may be started for an object database prior to writing new - * objects via odb_transaction_begin(). These objects are not committed until - * odb_transaction_commit() is invoked. Only a single transaction may be pending - * at a time. - * - * Each ODB source is expected to implement its own transaction handling. - */ - struct odb_transaction; - typedef void (*odb_transaction_commit_fn)(struct odb_transaction *transaction); - struct odb_transaction { - /* The ODB source the transaction is opened against. */ - struct odb_source *source; - - /* The ODB source specific callback invoked to commit a transaction. */ - odb_transaction_commit_fn commit; - }; -struct packed_git; -struct packfile_store; -struct cached_object_entry; -- /* * The object database encapsulates access to objects in a repository. It * manages one or more sources that store the actual objects which are