Merge branch 'kb/maint-status-cquote' into maint
* kb/maint-status-cquote: status: Quote paths with spaces in short format
This commit is contained in:
commit
0ec9ee3bcf
10
wt-status.c
10
wt-status.c
@ -744,10 +744,20 @@ static void wt_shortstatus_status(int null_termination, struct string_list_item
|
|||||||
const char *one;
|
const char *one;
|
||||||
if (d->head_path) {
|
if (d->head_path) {
|
||||||
one = quote_path(d->head_path, -1, &onebuf, s->prefix);
|
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);
|
printf("%s -> ", one);
|
||||||
strbuf_release(&onebuf);
|
strbuf_release(&onebuf);
|
||||||
}
|
}
|
||||||
one = quote_path(it->string, -1, &onebuf, s->prefix);
|
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);
|
printf("%s\n", one);
|
||||||
strbuf_release(&onebuf);
|
strbuf_release(&onebuf);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user