]> git.ipfire.org Git - thirdparty/git.git/commit - bulk-checkin.h
bulk-checkin: rebrand plug/unplug APIs as 'odb transactions'
authorNeeraj Singh <neerajsi@microsoft.com>
Tue, 5 Apr 2022 05:20:08 +0000 (22:20 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Apr 2022 20:02:09 +0000 (13:02 -0700)
commit2c23d1b4776ec7b089943edb234f5de4312a6e30
tree3e465e97c209a77f6a6f539b4adb238a91bc2396
parent897c9e2575457a454ac63c5e80ffecd304d1fa35
bulk-checkin: rebrand plug/unplug APIs as 'odb transactions'

Make it clearer in the naming and documentation of the plug_bulk_checkin
and unplug_bulk_checkin APIs that they can be thought of as
a "transaction" to optimize operations on the object database. These
transactions may be nested so that subsystems like the cache-tree
writing code can optimize their operations without caring whether the
top-level code has a transaction active.

Add a flush_odb_transaction API that will be used in update-index to
make objects visible even if a transaction is active. The flush call may
also be useful in future cases if we hold a transaction active around
calling hooks.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/add.c
bulk-checkin.c
bulk-checkin.h