diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-28 13:23:20 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-28 13:23:20 -0800 |
commit | 0ec9ee3bcf5c926df9d54f63ff3ed8b97e19bb0d (patch) | |
tree | 52f93cd8aa4662efbf01c7c9a3004c8703c68a18 | |
parent | 5cd3e10737135163f47e97e0338dbf33f4772511 (diff) | |
parent | dbfdc625a5aad10c47e3ffa446d0b92e341a7b44 (diff) | |
download | git-0ec9ee3bcf5c926df9d54f63ff3ed8b97e19bb0d.tar.gz |
Merge branch 'kb/maint-status-cquote' into maint
* kb/maint-status-cquote:
status: Quote paths with spaces in short format
-rw-r--r-- | wt-status.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/wt-status.c b/wt-status.c index fc2438f60b..9624865e21 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); } |