From: Jeff King <peff@peff.net>
To: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Cc: git@vger.kernel.org, "Taylor Blau" <ttaylorr@github.com>,
"Bagas Sanjaya" <bagasdotme@gmail.com>,
"Torsten Bögershausen" <tboegi@web.de>,
"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH v4] t: use user-specified utf-8 locale for testing svn
Date: Tue, 8 Jun 2021 02:38:51 -0400 [thread overview]
Message-ID: <YL8Qe31z1Q5/DkmF@coredump.intra.peff.net> (raw)
In-Reply-To: <20210607010844.24587-1-congdanhqx@gmail.com>
On Mon, Jun 07, 2021 at 08:08:44AM +0700, Đoàn Trần Công Danh wrote:
> In some test-cases, UTF-8 locale is required. To find such locale,
> we're using the first available UTF-8 locale that returned by
> "locale -a".
>
> However, the locale(1) utility is unavailable on some systems,
> e.g. Linux with musl libc.
>
> However, without "locale -a", we can't guess provided UTF-8 locale.
>
> Add a Makefile knob GIT_TEST_UTF8_LOCALE and activate it for
> linux-musl in our CI system.
>
> Rename t/lib-git-svn.sh:prepare_a_utf8_locale to prepare_utf8_locale,
> since we no longer prepare the variable named "a_utf8_locale",
> but set up a fallback value for GIT_TEST_UTF8_LOCALE instead.
> The fallback will be LC_ALL, LANG environment variable,
> or the first UTF-8 locale from output of "locale -a", in that order.
This patch looks good to me. I have one tiny nit below, but I'm OK if
it's left as-is:
> +prepare_utf8_locale () {
> + if test -n "$GIT_TEST_UTF8_LOCALE"
> + then
> + : test_set_prereq UTF8
This ":" is really just a comment, but since it contains code we would
like to run (but which actually gets run later), it confused me.
Something like:
: already set by the caller, nothing to do
would have made it easier to understand.
And then the rest of the function is pretty self-explanatory.
-Peff
next prev parent reply other threads:[~2021-06-08 6:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 11:46 [PATCH] t: use user-specific utf-8 locale for testing Đoàn Trần Công Danh
2021-06-02 19:56 ` Taylor Blau
2021-06-08 10:49 ` Ævar Arnfjörð Bjarmason
2021-06-03 19:27 ` Jeff King
2021-06-04 3:32 ` Bagas Sanjaya
2021-06-04 5:20 ` Đoàn Trần Công Danh
2021-06-06 16:33 ` [PATCH v2] " Đoàn Trần Công Danh
2021-06-06 20:06 ` Torsten Bögershausen
2021-06-07 0:20 ` Junio C Hamano
2021-06-07 0:48 ` [PATCH v3] t: use pre-defined utf-8 locale for testing svn Đoàn Trần Công Danh
2021-06-07 1:01 ` Junio C Hamano
2021-06-07 14:38 ` Torsten Bögershausen
2021-06-07 15:42 ` Đoàn Trần Công Danh
2021-06-08 6:35 ` Jeff King
2021-06-08 6:45 ` Đoàn Trần Công Danh
2021-06-07 1:08 ` [PATCH v4] t: use user-specified " Đoàn Trần Công Danh
2021-06-08 6:38 ` Jeff King [this message]
2021-06-08 6:56 ` [PATCH v5] " Đoàn Trần Công Danh
2021-06-08 7:26 ` Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YL8Qe31z1Q5/DkmF@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=bagasdotme@gmail.com \
--cc=congdanhqx@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tboegi@web.de \
--cc=ttaylorr@github.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).