aboutsummaryrefslogtreecommitdiffstats
path: root/wt-status.c
diff options
context:
space:
mode:
authorMatthew DeVore <matvore@google.com>2019-06-18 15:29:15 -0700
committerJunio C Hamano <gitster@pobox.com>2019-06-19 08:24:41 -0700
commit28438e84e046984afc76dc891a49bd0862d555f7 (patch)
tree5b86305a3fb357865d3868efd65541454f00abd5 /wt-status.c
parentaeb582a98374c094361cba1bd756dc6307432c42 (diff)
downloadgit-28438e84e046984afc76dc891a49bd0862d555f7.tar.gz
ref-filter: sort detached HEAD lines firstly
Before this patch, "git branch" would put "(HEAD detached...)" and "(no branch, rebasing...)" lines before all the other branches *in most cases* except for when using Chinese-language messages. zh_CN generally uses a full-width "(" symbol (codepoint FF08) to match the full-width proportions of Chinese characters, and the translated strings we had did use them. This meant that the detached HEAD line would appear after all local refs and even after the remote refs if there were any. AFAIK, it is sometimes not jarring to see the half-width parenthesis in "full-width" text as in the CJK languages, for instance when there are no characters preceding or following the parenthesized text fragment. By removing the parenthesis from the localizable text, we can share strings with wt-status.c and remove a cautionary comment to translators. Remove the ( from the localizable portion of messages so the sorting happens properly regardless of locale. Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Helped-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Matthew DeVore <matvore@google.com> 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 1f564b12d2..9e24855b82 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1628,9 +1628,9 @@ static void wt_longstatus_print(struct wt_status *s)
} else if (s->state.detached_from) {
branch_name = s->state.detached_from;
if (s->state.detached_at)
- on_what = _("HEAD detached at ");
+ on_what = HEAD_DETACHED_AT;
else
- on_what = _("HEAD detached from ");
+ on_what = HEAD_DETACHED_FROM;
} else {
branch_name = "";
on_what = _("Not currently on any branch.");