-#include <ctype.h>
#include "cache.h"
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) {
}
if (!isalpha(c))
break;
- var[baselen] = c;
+ var[baselen] = tolower(c);
if (get_value(fn, var, baselen+1) < 0)
break;
}
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;
+ }
+
+ if (!strcmp(var, "user.email")) {
+ strncpy(git_default_email, value, sizeof(git_default_email));
+ return 0;
+ }
+
/* Add other config variables here.. */
return 0;
}