]> git.ipfire.org Git - thirdparty/git.git/blobdiff - config.c
Merge branch 'gc/branch-recurse-submodules-fix'
[thirdparty/git.git] / config.c
index 94a4598b5fcf49801f7537e80738835166c14765..9eb0dbb448bd9f8fe54ba36536ffba5fd7d50bfa 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1331,6 +1331,13 @@ 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 },
+       { "objects", FSYNC_COMPONENTS_OBJECTS },
+       { "reference", FSYNC_COMPONENT_REFERENCE },
+       { "derived-metadata", FSYNC_COMPONENTS_DERIVED_METADATA },
+       { "committed", FSYNC_COMPONENTS_COMMITTED },
+       { "added", FSYNC_COMPONENTS_ADDED },
+       { "all", FSYNC_COMPONENTS_ALL },
 };
 
 static enum fsync_component parse_fsync_components(const char *var, const char *string)
@@ -1688,7 +1695,7 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
 
        if (!strcmp(var, "core.fsyncobjectfiles")) {
                if (fsync_object_files < 0)
-                       warning(_("core.fsyncobjectfiles is deprecated; use core.fsync instead"));
+                       warning(_("core.fsyncObjectFiles is deprecated; use core.fsync instead"));
                fsync_object_files = git_config_bool(var, value);
                return 0;
        }
@@ -1742,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"))
@@ -1873,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;
 }