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>
This commit is contained in:

committed by
Junio C Hamano

parent
844a8ad4f8
commit
ba95e96d4c
1
config.c
1
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)
|
||||
|
Reference in New Issue
Block a user