diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-03 16:13:06 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-03 16:13:06 -0800 |
commit | 905ffa44248ce1578d22b342eb6c522da90e2f61 (patch) | |
tree | 371e01ffafd1af862289503b3d828d07ec9aee53 /wt-status.c | |
parent | 39f04dbaacbb21864547c8cf087697469666d21e (diff) | |
parent | dbfdc625a5aad10c47e3ffa446d0b92e341a7b44 (diff) | |
download | git-905ffa44248ce1578d22b342eb6c522da90e2f61.tar.gz |
Merge branch 'kb/maint-status-cquote'
* kb/maint-status-cquote:
status: Quote paths with spaces in short format
Diffstat (limited to 'wt-status.c')
-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 d9f3d9fe93..06ae161c67 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); } |