summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-03-23 21:55:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-03-23 21:55:40 (GMT)
commitda2584243e4308f10adeb45e95fb090c0110fe4f (patch)
tree0c32caa2ad160cee9703a5481536d037179e60f1 /config.c
parent6fe519a91cc7131931ca50fedcdeb8e41453c892 (diff)
parenta71f09fe3e8b047d88b5f439c6d552e8fc7e8293 (diff)
downloadgit-da2584243e4308f10adeb45e95fb090c0110fe4f.zip
git-da2584243e4308f10adeb45e95fb090c0110fe4f.tar.gz
git-da2584243e4308f10adeb45e95fb090c0110fe4f.tar.bz2
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 e28197a..0abcada 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)