summaryrefslogtreecommitdiff
path: root/builtin/describe.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 /builtin/describe.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 'builtin/describe.c')
-rw-r--r--builtin/describe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index 3ba26dc..4afd150 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -21,7 +21,7 @@ static int debug; /* Display lots of verbose info */
static int all; /* Any valid ref can be used */
static int tags; /* Allow lightweight tags */
static int longformat;
-static int abbrev = DEFAULT_ABBREV;
+static int abbrev = -1; /* unspecified */
static int max_candidates = 10;
static struct hash_table names;
static int have_util;
@@ -420,7 +420,11 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
OPT_END(),
};
+ git_config(git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, describe_usage, 0);
+ if (abbrev < 0)
+ abbrev = DEFAULT_ABBREV;
+
if (max_candidates < 0)
max_candidates = 0;
else if (max_candidates > MAX_TAGS)