summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-05-06 22:31:10 -0700
committerJunio C Hamano <gitster@pobox.com>2013-05-06 22:31:42 -0700
commit6f4dd60d0713980cf976f569eb83850f9a28fe3c (patch)
treef3e8609059cec109182622bb704cac0074c8296a
parent239222f587ed06f96d90dd71c66d80a2b1e3dc9f (diff)
downloadgit-6f4dd60d0713980cf976f569eb83850f9a28fe3c.tar.gz
deprecate core.statinfo at Git 2.0 boundary
c08e4d5b5cfa (Enable minimal stat checking, 2013-01-22) advertised the configuration variable core.checkstat in the documentation and its log message, but the code expected core.statinfo instead. For now, add core.checkstat, and warn people who have core.statinfo in their configuration file that we will remove it in Git 2.0. Noticed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--config.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/config.c b/config.c
index aefd80b12a..7c55d05e80 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"))