summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-08-05 12:37:40 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-08-05 12:37:40 -0700
commitc39e9eb3df18c34330d50ebfae28b42880d9a4cc (patch)
treee401088b387f87c81127c707e381d61176905226 /config.c
parentgit-merge-base/git-show-branch --merge-base: Documentation and test (diff)
parentMerge branch 'maint-1.6.3' into maint (diff)
downloadtgif-c39e9eb3df18c34330d50ebfae28b42880d9a4cc.tar.xz
Merge branch 'maint'
* maint: gitweb/README: Document $base_url Documentation: git submodule: add missing options to synopsis 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 738b24419d..e87edeab0c 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) {