]> git.ipfire.org Git - thirdparty/git.git/blobdiff - config.c
Merge branch 'gc/branch-recurse-submodules-fix'
[thirdparty/git.git] / config.c
index b8497b9fa79d143fa56d9e3c1577e44be9c71968..9eb0dbb448bd9f8fe54ba36536ffba5fd7d50bfa 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1333,6 +1333,7 @@ static const struct fsync_component_name {
        { "commit-graph", FSYNC_COMPONENT_COMMIT_GRAPH },
        { "index", FSYNC_COMPONENT_INDEX },
        { "objects", FSYNC_COMPONENTS_OBJECTS },
+       { "reference", FSYNC_COMPONENT_REFERENCE },
        { "derived-metadata", FSYNC_COMPONENTS_DERIVED_METADATA },
        { "committed", FSYNC_COMPONENTS_COMMITTED },
        { "added", FSYNC_COMPONENTS_ADDED },
@@ -1748,6 +1749,17 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
        return platform_core_config(var, value, cb);
 }
 
+static int git_default_sparse_config(const char *var, const char *value)
+{
+       if (!strcmp(var, "sparse.expectfilesoutsideofpatterns")) {
+               sparse_expect_files_outside_of_patterns = git_config_bool(var, value);
+               return 0;
+       }
+
+       /* Add other config variables here and to Documentation/config/sparse.txt. */
+       return 0;
+}
+
 static int git_default_i18n_config(const char *var, const char *value)
 {
        if (!strcmp(var, "i18n.commitencoding"))
@@ -1879,6 +1891,9 @@ int git_default_config(const char *var, const char *value, void *cb)
                return 0;
        }
 
+       if (starts_with(var, "sparse."))
+               return git_default_sparse_config(var, value);
+
        /* Add other config variables here and to Documentation/config.txt. */
        return 0;
 }