Code

git-svn: correctly kill keyword expansion without munging EOLs
[git.git] / config.c
index ec44827da4afbcf89a5eed37c7f557a7ffdce35d..82b35624543a2e50d80cafab15b63df0152adbc0 100644 (file)
--- a/config.c
+++ b/config.c
@@ -244,9 +244,9 @@ int git_config_bool(const char *name, const char *value)
                return 1;
        if (!*value)
                return 0;
-       if (!strcasecmp(value, "true"))
+       if (!strcasecmp(value, "true") || !strcasecmp(value, "yes"))
                return 1;
-       if (!strcasecmp(value, "false"))
+       if (!strcasecmp(value, "false") || !strcasecmp(value, "no"))
                return 0;
        return git_config_int(name, value) != 0;
 }
@@ -279,6 +279,21 @@ int git_default_config(const char *var, const char *value)
                return 0;
        }
 
+       if (!strcmp(var, "core.legacyheaders")) {
+               use_legacy_headers = git_config_bool(var, value);
+               return 0;
+       }
+
+       if (!strcmp(var, "core.compression")) {
+               int level = git_config_int(var, value);
+               if (level == -1)
+                       level = Z_DEFAULT_COMPRESSION;
+               else if (level < 0 || level > Z_BEST_COMPRESSION)
+                       die("bad zlib compression level %d", level);
+               zlib_compression_level = level;
+               return 0;
+       }
+
        if (!strcmp(var, "user.name")) {
                strlcpy(git_default_name, value, sizeof(git_default_name));
                return 0;
@@ -294,6 +309,11 @@ int git_default_config(const char *var, const char *value)
                return 0;
        }
 
+       if (!strcmp(var, "pager.color")) {
+               pager_use_color = git_config_bool(var,value);
+               return 0;
+       }
+
        /* Add other config variables here and to Documentation/config.txt. */
        return 0;
 }