Skip to content

Commit

Permalink
Merge branch 'kb/maint-status-cquote' into maint
Browse files Browse the repository at this point in the history
* kb/maint-status-cquote:
  status: Quote paths with spaces in short format
  • Loading branch information
Junio C Hamano committed Dec 28, 2010
2 parents 5cd3e10 + dbfdc62 commit 0ec9ee3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wt-status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0ec9ee3

Please sign in to comment.