X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=config.c;h=6963fbea43e6420f5f8dafc5b94fb5c27de6ffd2;hb=bde873c52914b40377a12764cab926ee974c3f32;hp=37385ce9d338ecbd2556cef9455000784ebab7e5;hpb=36a83f375bc247a09f46de0445a138d5e6de8a4f;p=git.git diff --git a/config.c b/config.c index 37385ce9d..6963fbea4 100644 --- a/config.c +++ b/config.c @@ -518,6 +518,11 @@ static int git_default_core_config(const char *var, const char *value) return 0; } + if (!strcmp(var, "core.sparsecheckout")) { + core_apply_sparse_checkout = git_config_bool(var, value); + return 0; + } + /* Add other config variables here and to Documentation/config.txt. */ return 0; } @@ -528,8 +533,7 @@ static int git_default_user_config(const char *var, const char *value) if (!value) return config_error_nonbool(var); strlcpy(git_default_name, value, sizeof(git_default_name)); - if (git_default_email[0]) - user_ident_explicitly_given = 1; + user_ident_explicitly_given |= IDENT_NAME_GIVEN; return 0; } @@ -537,8 +541,7 @@ static int git_default_user_config(const char *var, const char *value) if (!value) return config_error_nonbool(var); strlcpy(git_default_email, value, sizeof(git_default_email)); - if (git_default_name[0]) - user_ident_explicitly_given = 1; + user_ident_explicitly_given |= IDENT_MAIL_GIVEN; return 0; }