From: Junio C Hamano Date: Sat, 4 Dec 2010 00:13:06 +0000 (-0800) Subject: Merge branch 'kb/maint-status-cquote' X-Git-Tag: v1.7.4-rc0~88 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=905ffa44248ce1578d22b342eb6c522da90e2f61;hp=39f04dbaacbb21864547c8cf087697469666d21e;p=git.git Merge branch 'kb/maint-status-cquote' * kb/maint-status-cquote: status: Quote paths with spaces in short format --- diff --git a/wt-status.c b/wt-status.c index d9f3d9fe9..06ae161c6 100644 --- a/wt-status.c +++ b/wt-status.c @@ -744,10 +744,20 @@ static void wt_shortstatus_status(int null_termination, struct string_list_item const char *one; if (d->head_path) { one = quote_path(d->head_path, -1, &onebuf, s->prefix); + if (*one != '"' && strchr(one, ' ') != NULL) { + putchar('"'); + strbuf_addch(&onebuf, '"'); + one = onebuf.buf; + } printf("%s -> ", one); strbuf_release(&onebuf); } one = quote_path(it->string, -1, &onebuf, s->prefix); + if (*one != '"' && strchr(one, ' ') != NULL) { + putchar('"'); + strbuf_addch(&onebuf, '"'); + one = onebuf.buf; + } printf("%s\n", one); strbuf_release(&onebuf); }