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:
authorJunio C Hamano <gitster@pobox.com>2021-01-16 02:20:28 +0300
committerJunio C Hamano <gitster@pobox.com>2021-01-16 02:20:28 +0300
commit6dbbae17d9d1f35e7b46d04ba69e453e0a384ac9 (patch)
tree41a8db8c59a11dbe2996c3188a0a740e4020b7bc /config.c
parent72c4083ddf91b489b7b7b812df67ee8842177d98 (diff)
parenta9ecaa06a7235e62a9cf4703a19463fcee4449c7 (diff)
Merge branch 'ew/decline-core-abbrev'
The configuration variable 'core.abbrev' can be set to 'no' to force no abbreviation regardless of the hash algorithm. * ew/decline-core-abbrev: core.abbrev=no disables abbreviations
Diffstat (limited to 'config.c')
-rw-r--r--config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.c b/config.c
index 1137bd73af..4c0cf3a1c1 100644
--- a/config.c
+++ b/config.c
@@ -1217,6 +1217,8 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
return config_error_nonbool(var);
if (!strcasecmp(value, "auto"))
default_abbrev = -1;
+ else if (!git_parse_maybe_bool_text(value))
+ default_abbrev = the_hash_algo->hexsz;
else {
int abbrev = git_config_int(var, value);
if (abbrev < minimum_abbrev || abbrev > the_hash_algo->hexsz)