summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-03-23 14:55:40 -0700
committerJunio C Hamano <gitster@pobox.com>2011-03-23 14:55:40 -0700
commitda2584243e4308f10adeb45e95fb090c0110fe4f (patch)
tree0c32caa2ad160cee9703a5481536d037179e60f1 /config.c
parent6fe519a91cc7131931ca50fedcdeb8e41453c892 (diff)
parenta71f09fe3e8b047d88b5f439c6d552e8fc7e8293 (diff)
downloadgit-da2584243e4308f10adeb45e95fb090c0110fe4f.tar.gz
Merge branch 'lt/default-abbrev'
* lt/default-abbrev: Rename core.abbrevlength back to core.abbrev Make the default abbrev length configurable
Diffstat (limited to 'config.c')
-rw-r--r--config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/config.c b/config.c
index e28197a3f6..0abcada938 100644
--- a/config.c
+++ b/config.c
@@ -523,6 +523,14 @@ static int git_default_core_config(const char *var, const char *value)
return 0;
}
+ if (!strcmp(var, "core.abbrev")) {
+ int abbrev = git_config_int(var, value);
+ if (abbrev < minimum_abbrev || abbrev > 40)
+ return -1;
+ default_abbrev = abbrev;
+ return 0;
+ }
+
if (!strcmp(var, "core.loosecompression")) {
int level = git_config_int(var, value);
if (level == -1)