summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2017-12-05 16:58:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-05 17:46:05 (GMT)
commit75b97fec171dbbf7ec73960cefb50c265cfb7af7 (patch)
treec15613ea262cfa6be8009556d6129898b3b9e9c8 /setup.c
parentf4371a883fa2d740d6b3cd436f62c9b56f13432e (diff)
downloadgit-75b97fec171dbbf7ec73960cefb50c265cfb7af7.zip
git-75b97fec171dbbf7ec73960cefb50c265cfb7af7.tar.gz
git-75b97fec171dbbf7ec73960cefb50c265cfb7af7.tar.bz2
extension.partialclone: introduce partial clone extension
Introduce new repository extension option: `extensions.partialclone` See the update to Documentation/technical/repository-version.txt in this patch for more information. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index 03f51e0..58536bd 100644
--- a/setup.c
+++ b/setup.c
@@ -420,7 +420,11 @@ static int check_repo_format(const char *var, const char *value, void *vdata)
;
else if (!strcmp(ext, "preciousobjects"))
data->precious_objects = git_config_bool(var, value);
- else
+ else if (!strcmp(ext, "partialclone")) {
+ if (!value)
+ return config_error_nonbool(var);
+ data->partial_clone = xstrdup(value);
+ } else
string_list_append(&data->unknown_extensions, ext);
} else if (strcmp(var, "core.bare") == 0) {
data->is_bare = git_config_bool(var, value);
@@ -463,6 +467,7 @@ static int check_repository_format_gently(const char *gitdir, int *nongit_ok)
}
repository_format_precious_objects = candidate.precious_objects;
+ repository_format_partial_clone = candidate.partial_clone;
string_list_clear(&candidate.unknown_extensions, 0);
if (!has_common) {
if (candidate.is_bare != -1) {