From: Junio C Hamano <gitster@pobox.com>
To: Jiang Xin <worldhello.net@gmail.com>
Cc: Git List <git@vger.kernel.org>,
Jiang Xin <zhiyou.jx@alibaba-inc.com>,
Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH] help: report on whether or not gettext is enabled
Date: Fri, 16 Jan 2026 07:46:59 -0800 [thread overview]
Message-ID: <xmqqo6mta7bg.fsf@gitster.g> (raw)
In-Reply-To: <f3500e698fd40297d2e2634785529b76d49ca470.1768530514.git.zhiyou.jx@alibaba-inc.com> (Jiang Xin's message of "Fri, 16 Jan 2026 10:29:40 +0800")
Jiang Xin <worldhello.net@gmail.com> writes:
> From: Jiang Xin <zhiyou.jx@alibaba-inc.com>
>
> When users report that Git has no localized output, we need to check not
> only their locale settings, but also whether Git was built with GETTEXT
> support in the first place.
>
> Expose this information via the existing build info output by adding a
> "gettext: enabled|disabled" line to `git version --build-options` (and
> therefore also to `git bugreport`). The status is derived from whether
> `NO_GETTEXT` is defined at build time.
>
> Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
> ---
> help.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/help.c b/help.c
> index 20e114432d..96d70d8e6c 100644
> --- a/help.c
> +++ b/help.c
> @@ -799,6 +799,11 @@ void get_version_info(struct strbuf *buf, int show_build_options)
>
> if (fsmonitor_ipc__is_supported())
> strbuf_addstr(buf, "feature: fsmonitor--daemon\n");
> +#if defined NO_GETTEXT
> + strbuf_addstr(buf, "gettext: disabled\n");
> +#else
> + strbuf_addstr(buf, "gettext: enabled\n");
> +#endif
Presumably, we do not care too much about the version of this thing
unlike ...
> #if defined LIBCURL_VERSION
> strbuf_addf(buf, "libcurl: %s\n", LIBCURL_VERSION);
> #endif
... we do for the curl library, so only reporting "enabled" does
feel perfectly OK to me.
I would prefer not to see the "disabled" entry myself, by the way.
Combined with the vintage of Git binary that had these help text,
the fact that an "enabled" line is missing is enough clue to
diagnose. I know you mimicked the Rust entry before this point
(just above the precontext of the hunk), but I think we should fix
it to drop the "disabled" entry from there.
Cc'ed the author of cb2badb4 (help: report on whether or not Rust is
enabled, 2025-10-02).
next prev parent reply other threads:[~2026-01-16 15:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 2:29 [PATCH] help: report on whether or not gettext is enabled Jiang Xin
2026-01-16 15:46 ` Junio C Hamano [this message]
2026-01-17 13:59 ` [PATCH v2] " Jiang Xin
2026-01-19 7:03 ` [PATCH] " Patrick Steinhardt
2026-01-19 10:17 ` Jiang Xin
2026-01-20 0:15 ` Junio C Hamano
2026-01-20 5:47 ` Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqo6mta7bg.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=worldhello.net@gmail.com \
--cc=zhiyou.jx@alibaba-inc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox