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:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index 78e7ae1be7..c04cd25a30 100644
--- a/setup.c
+++ b/setup.c
@@ -490,8 +490,17 @@ static enum extension_result handle_extension(const char *var,
{
if (!strcmp(ext, "noop-v1")) {
return EXTENSION_OK;
- }
+ } else if (!strcmp(ext, "objectformat")) {
+ int format;
+ if (!value)
+ return config_error_nonbool(var);
+ format = hash_algo_by_name(value);
+ if (format == GIT_HASH_UNKNOWN)
+ return error("invalid value for 'extensions.objectformat'");
+ data->hash_algo = format;
+ return EXTENSION_OK;
+ }
return EXTENSION_UNKNOWN;
}