Re: [PATCH v3 11/11] builtin/receive-pack: stage incoming objects via ODB transactions
From: Justin Tobler <hidden>
Date: 2026-07-10 14:37:25
On 26/07/08 08:49PM, Junio C Hamano wrote:
Justin Tobler [off-list ref] writes:quoted
update_shallow_info(commands, &si, &ref); } use_keepalive = KEEPALIVE_ALWAYS; - execute_commands(commands, unpack_status, &si, + execute_commands(commands, unpack_status, &si, transaction, &push_options);And in such a case, execute_commands() returns without committing the transaction. Is there a need to add and make an odb_transaction_abort() call or something in such a case? Everything should be cleaned up upon process exit, and on file based backends, we probably let the tempfile/lockfile API do their thing to clean up, but are there other things we may want to clean up?
As you mentioned, if we exit before committing the ODB transaction, the temporary directory will get cleaned up when the process exits. I don't think there is anything else we need to cleanup that wouldn't be handled at exit though. Regardless, I do plan to add `odb_transaction_abort()` in a followup series and I think it would be nice to have an explicit "abort" here when we know that we are not going to commit anyways. I would like to defer this to my next series though. -Justin