summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-06-05 14:53:07 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-06-05 14:53:07 -0700
commit446913e5dbe32835ba0e354b77cc35182684b7c5 (patch)
treede3fe2698cfee7260d063b6847586cd3946756fe
parentMerge branch 'maint' (diff)
parentdeprecate core.statinfo at Git 2.0 boundary (diff)
downloadtgif-446913e5dbe32835ba0e354b77cc35182684b7c5.tar.xz
Merge branch 'jc/core-checkstat'
The configuration variable core.checkstat was advertised in the documentation but the code expected core.statinfo instead. For now, we accept both core.checkstat and core.statinfo, but the latter will be removed in the longer term. * jc/core-checkstat: deprecate core.statinfo at Git 2.0 boundary
-rw-r--r--config.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/config.c b/config.c
index 830ee14b43..7a85ebdbae 100644
--- a/config.c
+++ b/config.c
@@ -566,7 +566,20 @@ static int git_default_core_config(const char *var, const char *value)
trust_ctime = git_config_bool(var, value);
return 0;
}
- if (!strcmp(var, "core.statinfo")) {
+ if (!strcmp(var, "core.statinfo") ||
+ !strcmp(var, "core.checkstat")) {
+ /*
+ * NEEDSWORK: statinfo was a typo in v1.8.2 that has
+ * never been advertised. we will remove it at Git
+ * 2.0 boundary.
+ */
+ if (!strcmp(var, "core.statinfo")) {
+ static int warned;
+ if (!warned++) {
+ warning("'core.statinfo' will be removed in Git 2.0; "
+ "use 'core.checkstat' instead.");
+ }
+ }
if (!strcasecmp(value, "default"))
check_stat = 1;
else if (!strcasecmp(value, "minimal"))