summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-10 17:01:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-10 20:07:24 (GMT)
commita361dd3f798968b3be4bd10d0f4133dc1f48e50b (patch)
treeba12173f387f29620b67174e649f65f67cec3397 /wt-status.c
parente2773aa45f673d26fe425cc5423299726f299f0b (diff)
downloadgit-a361dd3f798968b3be4bd10d0f4133dc1f48e50b.zip
git-a361dd3f798968b3be4bd10d0f4133dc1f48e50b.tar.gz
git-a361dd3f798968b3be4bd10d0f4133dc1f48e50b.tar.bz2
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>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wt-status.c b/wt-status.c
index adbf695..7139623 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -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);