]> git.ipfire.org Git - thirdparty/git.git/commit
core.fsync: new option to harden the index
authorNeeraj Singh <neerajsi@microsoft.com>
Thu, 10 Mar 2022 22:43:23 +0000 (22:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Mar 2022 23:10:22 +0000 (15:10 -0800)
commitba95e96d4c6eed42e30ac3c8b260f4459e3a8575
treed073510d5f2fc389d23f7965839c7f994bab102f
parent844a8ad4f868dcac8851012fe6dafd49b301b2ae
core.fsync: new option to harden the index

This commit introduces the new ability for the user to harden
the index. In the event of a system crash, the index must be
durable for the user to actually find a file that has been added
to the repo and then deleted from the working tree.

We use the presence of the COMMIT_LOCK flag and absence of the
alternate_index_output as a proxy for determining whether we're
updating the persistent index of the repo or some temporary
index. We don't sync these temporary indexes.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
config.c
read-cache.c