]> git.ipfire.org Git - thirdparty/git.git/commit - environment.c
core.fsync: add configuration parsing
authorNeeraj Singh <neerajsi@microsoft.com>
Thu, 10 Mar 2022 22:43:22 +0000 (22:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Mar 2022 23:10:22 +0000 (15:10 -0800)
commit844a8ad4f868dcac8851012fe6dafd49b301b2ae
tree776c72758537eea6abbd90ae515027fb9ff268c7
parent020406eaa52e67440d9b78087ec2ce25532cb219
core.fsync: add configuration parsing

This change introduces code to parse the core.fsync setting and
configure the fsync_components variable.

core.fsync is configured as a comma-separated list of component names to
sync. Each time a core.fsync variable is encountered in the
configuration heirarchy, we start off with a clean state with the
platform default value. Passing 'none' resets the value to indicate
nothing will be synced. We gather all negative and positive entries from
the comma separated list and then compute the new value by removing all
the negative entries and adding all of the positive entries.

We issue a warning for components that are not recognized so that the
configuration code is compatible with configs from future versions of
Git with more repo components.

Complete documentation for the new setting is included in a later patch
in the series so that it can be reviewed once in final form.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/core.txt
config.c
environment.c