From: Junio C Hamano Date: Fri, 10 Jul 2026 16:52:12 GMT Subject: Re: [PATCH v3 11/11] builtin/receive-pack: stage incoming objects via ODB transactions Message-ID: In-Reply-To: Justin Tobler writes: > On 26/07/08 08:49PM, Junio C Hamano wrote: >> Justin Tobler writes: >> > 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. Sounds good. We cannot trigger receive-pack as a subroutine call in a long running daemon until that happens, but that is OK for now. One step at a time.