summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cfa24e1)
raw | patch | inline | side by side (parent: cfa24e1)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Tue, 2 May 2006 14:58:37 +0000 (16:58 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 2 May 2006 20:23:48 +0000 (13:23 -0700) |
Earlier, calling
git-repo-config core.hello
on a .git/config like this:
[core]
hello = world ; a comment
would yield "world " (i.e. with a trailing space).
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-repo-config core.hello
on a .git/config like this:
[core]
hello = world ; a comment
would yield "world " (i.e. with a trailing space).
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
config.c | patch | blob | history |
diff --git a/config.c b/config.c
index 4e1f0c22862b8c8605dbbf3a83ec4e87d9059513..253c48a6130a9268c106170df7205441d4ab36ac 100644 (file)
--- a/config.c
+++ b/config.c
space = 1;
continue;
}
+ if (!quote) {
+ if (c == ';' || c == '#') {
+ comment = 1;
+ continue;
+ }
+ }
if (space) {
if (len)
value[len++] = ' ';
quote = 1-quote;
continue;
}
- if (!quote) {
- if (c == ';' || c == '#') {
- comment = 1;
- continue;
- }
- }
value[len++] = c;
}
}