Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew DeVore <matvore@google.com>2019-06-19 01:29:15 +0300
committerJunio C Hamano <gitster@pobox.com>2019-06-19 18:24:41 +0300
commit28438e84e046984afc76dc891a49bd0862d555f7 (patch)
tree5b86305a3fb357865d3868efd65541454f00abd5 /wt-status.h
parentaeb582a98374c094361cba1bd756dc6307432c42 (diff)
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.h')
-rw-r--r--wt-status.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/wt-status.h b/wt-status.h
index 3a95975032..ecdeb828a1 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -65,6 +65,9 @@ enum wt_status_format {
STATUS_FORMAT_UNSPECIFIED
};
+#define HEAD_DETACHED_AT _("HEAD detached at ")
+#define HEAD_DETACHED_FROM _("HEAD detached from ")
+
struct wt_status_state {
int merge_in_progress;
int am_in_progress;