Remove flush_odb_transaction()
from bulk-checkin subsystem
The bulk-checkin subsystem provides an interface to manage object database transactions. A transaction is started with begin_odb_transaction()
and ended with end_odb_transaction()
. Interestingly, there is also flush_odb_transaction()
, which migrates objects written during the transaction to the primary object database without ending the transaction.
This makes for a rather awkward interface as generally ending/committing a transaction should be the point where things actually get committed. We should drop flush_odb_transaction()
and enforce that a transaction only commits when ended.
There is currently only a single caller of flush_odb_transaction()
in git-update-index(1). It is used when the command is specified with the --verbose
option so that objects are immediately made visible when the output reports they are written. This is really only useful when also paired with --stdin
. We will need to adapt this single call site to either not use transactions or commit and start a new one.