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.lorimer.id.au/gitweb.git/diff_plain/905ffa44248ce1578d22b342eb6c522da90e2f61?ds=inline;hp=-c Merge branch 'kb/maint-status-cquote' * kb/maint-status-cquote: status: Quote paths with spaces in short format --- 905ffa44248ce1578d22b342eb6c522da90e2f61 diff --combined wt-status.c index d9f3d9fe93,9624865e21..06ae161c67 --- a/wt-status.c +++ b/wt-status.c @@@ -88,7 -88,7 +88,7 @@@ static void wt_status_print_dirty_heade { const char *c = color(WT_STATUS_HEADER, s); - color_fprintf_ln(s->fp, c, "# Changed but not updated:"); + color_fprintf_ln(s->fp, c, "# Changes not staged for commit:"); if (!advice_status_hints) return; if (!has_deleted) @@@ -744,10 -744,20 +744,20 @@@ static void wt_shortstatus_status(int n 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); }