wt-status: consistently quote paths in "status --short" output
Tracked paths with SP in them were cquoted in "git status --short" output, but untracked, ignored, and unmerged paths weren't. The test was stolen from a patch to fix output for the 'untracked' paths by brian m. carlson, with similar tests added for 'ignored' ones. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -1848,7 +1848,7 @@ static void wt_shortstatus_unmerged(struct string_list_item *it,
|
||||
} else {
|
||||
struct strbuf onebuf = STRBUF_INIT;
|
||||
const char *one;
|
||||
one = quote_path(it->string, s->prefix, &onebuf, 0);
|
||||
one = quote_path(it->string, s->prefix, &onebuf, QUOTE_PATH_QUOTE_SP);
|
||||
printf(" %s\n", one);
|
||||
strbuf_release(&onebuf);
|
||||
}
|
||||
@ -1896,7 +1896,7 @@ static void wt_shortstatus_other(struct string_list_item *it,
|
||||
} else {
|
||||
struct strbuf onebuf = STRBUF_INIT;
|
||||
const char *one;
|
||||
one = quote_path(it->string, s->prefix, &onebuf, 0);
|
||||
one = quote_path(it->string, s->prefix, &onebuf, QUOTE_PATH_QUOTE_SP);
|
||||
color_fprintf(s->fp, color(WT_STATUS_UNTRACKED, s), "%s", sign);
|
||||
printf(" %s\n", one);
|
||||
strbuf_release(&onebuf);
|
||||
|
||||
Reference in New Issue
Block a user