Merge branch 'jc/core-checkstat' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 3 Jul 2013 22:39:15 +0000 (15:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Jul 2013 22:39:15 +0000 (15:39 -0700)
* jc/core-checkstat:
deprecate core.statinfo at Git 2.0 boundary

1  2 
config.c
diff --combined config.c
index 830ee14b437ca74a3db9e56ea8cedff78b7964b6,7c55d05e80bb44cd6c413492ea3feb3d740dfa07..7a85ebdbae79cf13305ebc821fafcd21a67c16d4
+++ b/config.c
@@@ -58,7 -58,7 +58,7 @@@ static int handle_path_include(const ch
                path = buf.buf;
        }
  
 -      if (!access_or_die(path, R_OK)) {
 +      if (!access_or_die(path, R_OK, 0)) {
                if (++inc->depth > MAX_INCLUDE_DEPTH)
                        die(include_depth_advice, MAX_INCLUDE_DEPTH, path,
                            cf && cf->name ? cf->name : "the command line");
@@@ -566,7 -566,20 +566,20 @@@ static int git_default_core_config(cons
                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"))
@@@ -954,23 -967,23 +967,23 @@@ int git_config_early(config_fn_t fn, vo
  
        home_config_paths(&user_config, &xdg_config, "config");
  
 -      if (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK)) {
 +      if (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0)) {
                ret += git_config_from_file(fn, git_etc_gitconfig(),
                                            data);
                found += 1;
        }
  
 -      if (xdg_config && !access_or_die(xdg_config, R_OK)) {
 +      if (xdg_config && !access_or_die(xdg_config, R_OK, ACCESS_EACCES_OK)) {
                ret += git_config_from_file(fn, xdg_config, data);
                found += 1;
        }
  
 -      if (user_config && !access_or_die(user_config, R_OK)) {
 +      if (user_config && !access_or_die(user_config, R_OK, ACCESS_EACCES_OK)) {
                ret += git_config_from_file(fn, user_config, data);
                found += 1;
        }
  
 -      if (repo_config && !access_or_die(repo_config, R_OK)) {
 +      if (repo_config && !access_or_die(repo_config, R_OK, 0)) {
                ret += git_config_from_file(fn, repo_config, data);
                found += 1;
        }