Skip to content

Commit 6f4dd60

Browse files
committed
deprecate core.statinfo at Git 2.0 boundary
c08e4d5 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 239222f commit 6f4dd60

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

config.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,20 @@ static int git_default_core_config(const char *var, const char *value)
566566
trust_ctime = git_config_bool(var, value);
567567
return 0;
568568
}
569-
if (!strcmp(var, "core.statinfo")) {
569+
if (!strcmp(var, "core.statinfo") ||
570+
!strcmp(var, "core.checkstat")) {
571+
/*
572+
* NEEDSWORK: statinfo was a typo in v1.8.2 that has
573+
* never been advertised. we will remove it at Git
574+
* 2.0 boundary.
575+
*/
576+
if (!strcmp(var, "core.statinfo")) {
577+
static int warned;
578+
if (!warned++) {
579+
warning("'core.statinfo' will be removed in Git 2.0; "
580+
"use 'core.checkstat' instead.");
581+
}
582+
}
570583
if (!strcasecmp(value, "default"))
571584
check_stat = 1;
572585
else if (!strcasecmp(value, "minimal"))

0 commit comments

Comments
 (0)