projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix users of prefix_path() to free() only when necessary
[git.git]
/
config.c
diff --git
a/config.c
b/config.c
index
4e1f0c2
..
87fb220
100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-60,6
+60,12
@@
static char *parse_value(void)
space = 1;
continue;
}
space = 1;
continue;
}
+ if (!quote) {
+ if (c == ';' || c == '#') {
+ comment = 1;
+ continue;
+ }
+ }
if (space) {
if (len)
value[len++] = ' ';
if (space) {
if (len)
value[len++] = ' ';
@@
-93,12
+99,6
@@
static char *parse_value(void)
quote = 1-quote;
continue;
}
quote = 1-quote;
continue;
}
- if (!quote) {
- if (c == ';' || c == '#') {
- comment = 1;
- continue;
- }
- }
value[len++] = c;
}
}
value[len++] = c;
}
}
@@
-227,8
+227,8
@@
int git_default_config(const char *var, const char *value)
return 0;
}
return 0;
}
- if (!strcmp(var, "core.
symrefsonly
")) {
-
only_use_sym
refs = git_config_bool(var, value);
+ if (!strcmp(var, "core.
prefersymlinkrefs
")) {
+
prefer_symlink_
refs = git_config_bool(var, value);
return 0;
}
return 0;
}
@@
-335,8
+335,9
@@
static int store_aux(const char* key, const char* value)
store.offset[store.seen] = ftell(config_file);
store.state = KEY_SEEN;
store.seen++;
store.offset[store.seen] = ftell(config_file);
store.state = KEY_SEEN;
store.seen++;
- } else if(!strncmp(key, store.key, store.baselen))
- store.state = SECTION_SEEN;
+ } else if (strrchr(key, '.') - key == store.baselen &&
+ !strncmp(key, store.key, store.baselen))
+ store.state = SECTION_SEEN;
}
return 0;
}
}
return 0;
}