git-fetch-pack: Do not use git-rev-list
[git.git] / config.c
index 510456c..519fecf 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1,4 +1,3 @@
-#include <ctype.h>
 
 #include "cache.h"
 
@@ -168,7 +167,7 @@ static int git_parse_file(config_fn_t fn)
                }
                if (!isalpha(c))
                        break;
-               var[baselen] = c;
+               var[baselen] = tolower(c);
                if (get_value(fn, var, baselen+1) < 0)
                        break;
        }
@@ -207,6 +206,16 @@ int git_default_config(const char *var, const char *value)
                return 0;
        }
 
+       if (!strcmp(var, "user.name")) {
+               strncpy(git_default_name, value, sizeof(git_default_name));
+               return 0;
+       }
+
+       if (!strcmp(var, "user.email")) {
+               strncpy(git_default_email, value, sizeof(git_default_email));
+               return 0;
+       }
+
        /* Add other config variables here.. */
        return 0;
 }