Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeeraj Singh <neerajsi@microsoft.com>2022-03-11 01:43:23 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-11 02:10:22 +0300
commitba95e96d4c6eed42e30ac3c8b260f4459e3a8575 (patch)
treed073510d5f2fc389d23f7965839c7f994bab102f /config.c
parent844a8ad4f868dcac8851012fe6dafd49b301b2ae (diff)
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>
Diffstat (limited to 'config.c')
-rw-r--r--config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/config.c b/config.c
index 94a4598b5f..80f33c9198 100644
--- a/config.c
+++ b/config.c
@@ -1331,6 +1331,7 @@ static const struct fsync_component_name {
{ "pack", FSYNC_COMPONENT_PACK },
{ "pack-metadata", FSYNC_COMPONENT_PACK_METADATA },
{ "commit-graph", FSYNC_COMPONENT_COMMIT_GRAPH },
+ { "index", FSYNC_COMPONENT_INDEX },
};
static enum fsync_component parse_fsync_components(const char *var, const char *string)