diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-01-15 15:20:28 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-15 15:20:28 -0800 |
commit | 6dbbae17d9d1f35e7b46d04ba69e453e0a384ac9 (patch) | |
tree | 41a8db8c59a11dbe2996c3188a0a740e4020b7bc /config.c | |
parent | The first batch in 2.31 cycle (diff) | |
parent | core.abbrev=no disables abbreviations (diff) | |
download | tgif-6dbbae17d9d1f35e7b46d04ba69e453e0a384ac9.tar.xz |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) |