Give python a chance to find "backported" modules
[git.git] / config.c
index 9b7c6f2..915bb97 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1,4 +1,3 @@
-#include <ctype.h>
 
 #include "cache.h"
 
@@ -14,6 +13,14 @@ static int get_next_char(void)
        c = '\n';
        if ((f = config_file) != NULL) {
                c = fgetc(f);
+               if (c == '\r') {
+                       /* DOS like systems */
+                       c = fgetc(f);
+                       if (c != '\n') {
+                               ungetc(c, f);
+                               c = '\r';
+                       }
+               }
                if (c == '\n')
                        config_linenr++;
                if (c == EOF) {
@@ -207,6 +214,11 @@ int git_default_config(const char *var, const char *value)
                return 0;
        }
 
+       if (!strcmp(var, "core.symrefsonly")) {
+               only_use_symrefs = git_config_bool(var, value);
+               return 0;
+       }
+
        if (!strcmp(var, "user.name")) {
                strncpy(git_default_name, value, sizeof(git_default_name));
                return 0;
@@ -217,6 +229,11 @@ int git_default_config(const char *var, const char *value)
                return 0;
        }
 
+       if (!strcmp(var, "diff.renamelimit")) {
+               diff_rename_limit_default = git_config_int(var, value);
+               return 0;
+       }
+
        /* Add other config variables here.. */
        return 0;
 }