]> git.ipfire.org Git - thirdparty/git.git/commit
update-index: use the bulk-checkin infrastructure
authorNeeraj Singh <neerajsi@microsoft.com>
Tue, 5 Apr 2022 05:20:12 +0000 (22:20 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Apr 2022 20:13:26 +0000 (13:13 -0700)
commit23a3a303ab9bfec2321ac4d1ae9f4df279f3a20c
tree085d3399d997dea5cbb9121a4b6e02c54817cca4
parentb4a0c6dc9733751788161ce3c181709be89045f9
update-index: use the bulk-checkin infrastructure

The update-index functionality is used internally by 'git stash push' to
setup the internal stashed commit.

This change enables odb-transactions for update-index infrastructure to
speed up adding new objects to the object database by leveraging the
batch fsync functionality.

There is some risk with this change, since under batch fsync, the object
files will be in a tmp-objdir until update-index is complete, so callers
using the --stdin option will not see them until update-index is done.
This risk is mitigated by flushing the ODB transaction prior to
reporting any verbose output so that objects will be visible to callers
that are synchronizing with update-index by snooping its output.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-index.c