summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-05 19:37:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-08-05 19:37:24 (GMT)
commitf0df1293acdba9513cae17e2c63b4169f1347371 (patch)
treee4d9309caa37b13a21ad38147833ed7ee29479bd /config.c
parent46068383aa825dfe9026f9255cea07da07e06253 (diff)
parente77095e8b8d541b41c242aa6dbc8319cb99def5e (diff)
downloadgit-f0df1293acdba9513cae17e2c63b4169f1347371.zip
git-f0df1293acdba9513cae17e2c63b4169f1347371.tar.gz
git-f0df1293acdba9513cae17e2c63b4169f1347371.tar.bz2
Merge branch 'maint-1.6.3' into maint
* maint-1.6.3: Better usage string for reflog. hg-to-git: don't import the unused popen2 module send-email: remove debug trace config: Keep inner whitespace verbatim
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/config.c b/config.c
index 738b244..e87edea 100644
--- a/config.c
+++ b/config.c
@@ -62,7 +62,8 @@ static char *parse_value(void)
if (comment)
continue;
if (isspace(c) && !quote) {
- space = 1;
+ if (len)
+ space++;
continue;
}
if (!quote) {
@@ -71,11 +72,8 @@ static char *parse_value(void)
continue;
}
}
- if (space) {
- if (len)
- value[len++] = ' ';
- space = 0;
- }
+ for (; space; space--)
+ value[len++] = ' ';
if (c == '\\') {
c = get_next_char();
switch (c) {