From: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Bagas Sanjaya" <bagasdotme@gmail.com>,
"Johannes Sixt" <j6t@kdbg.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Jean-Noël Avila" <jn.avila@free.fr>,
"Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH v2 5/6] i18n: factorize read-cache error messages
Date: Sat, 02 Apr 2022 16:10:52 +0000 [thread overview]
Message-ID: <1888778902aa1d0d2cf118cfb7fe4b2e407953c6.1648915853.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1181.v2.git.1648915853.gitgitgadget@gmail.com>
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
read-cache.c | 8 ++++----
t/t1600-index.sh | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/read-cache.c b/read-cache.c
index 1ad56d02e1d..639765e8ff1 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1735,8 +1735,8 @@ static unsigned int get_index_format_default(struct repository *r)
if (r->settings.index_version >= 0)
version = r->settings.index_version;
if (version < INDEX_FORMAT_LB || INDEX_FORMAT_UB < version) {
- warning(_("index.version set, but the value is invalid.\n"
- "Using version %i"), INDEX_FORMAT_DEFAULT);
+ warning(_("'%s' set, but the value is invalid.\n"
+ "Using version %i"), "index.version", INDEX_FORMAT_DEFAULT);
return INDEX_FORMAT_DEFAULT;
}
return version;
@@ -1745,8 +1745,8 @@ static unsigned int get_index_format_default(struct repository *r)
version = strtoul(envversion, &endp, 10);
if (*endp ||
version < INDEX_FORMAT_LB || INDEX_FORMAT_UB < version) {
- warning(_("GIT_INDEX_VERSION set, but the value is invalid.\n"
- "Using version %i"), INDEX_FORMAT_DEFAULT);
+ warning(_("'%s' set, but the value is invalid.\n"
+ "Using version %i"), "GIT_INDEX_VERSION", INDEX_FORMAT_DEFAULT);
version = INDEX_FORMAT_DEFAULT;
}
return version;
diff --git a/t/t1600-index.sh b/t/t1600-index.sh
index 010989f90e6..60339db529f 100755
--- a/t/t1600-index.sh
+++ b/t/t1600-index.sh
@@ -19,7 +19,7 @@ test_expect_success 'bogus GIT_INDEX_VERSION issues warning' '
git add a 2>err &&
sed "s/[0-9]//" err >actual.err &&
sed -e "s/ Z$/ /" <<-\EOF >expect.err &&
- warning: GIT_INDEX_VERSION set, but the value is invalid.
+ warning: '\''GIT_INDEX_VERSION'\'' set, but the value is invalid.
Using version Z
EOF
test_cmp expect.err actual.err
@@ -34,7 +34,7 @@ test_expect_success 'out of bounds GIT_INDEX_VERSION issues warning' '
git add a 2>err &&
sed "s/[0-9]//" err >actual.err &&
sed -e "s/ Z$/ /" <<-\EOF >expect.err &&
- warning: GIT_INDEX_VERSION set, but the value is invalid.
+ warning: '\''GIT_INDEX_VERSION'\'' set, but the value is invalid.
Using version Z
EOF
test_cmp expect.err actual.err
@@ -58,7 +58,7 @@ test_expect_success 'out of bounds index.version issues warning' '
git add a 2>err &&
sed "s/[0-9]//" err >actual.err &&
sed -e "s/ Z$/ /" <<-\EOF >expect.err &&
- warning: index.version set, but the value is invalid.
+ warning: '\''index.version'\'' set, but the value is invalid.
Using version Z
EOF
test_cmp expect.err actual.err
--
gitgitgadget
next prev parent reply other threads:[~2022-04-02 16:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-20 21:54 [PATCH 0/7] More i18n fixes Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 1/7] i18n: factorize generic failure messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 2/7] sequencer: factor GIT_AUTHOR_* from message strings Bagas Sanjaya via GitGitGadget
2022-03-21 5:22 ` Bagas Sanjaya
2022-03-20 21:54 ` [PATCH 3/7] i18n: factorize "bad argument" messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 4/7] i18n: factorize "Server does not support foo" messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 5/7] i18n: factorize "foo does not take arguments" messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 6/7] i18n: factorize read-cache error messages Jean-Noël Avila via GitGitGadget
2022-03-20 21:54 ` [PATCH 7/7] i18n: factorize unrecognized options arguments messages Jean-Noël Avila via GitGitGadget
2022-03-21 6:48 ` [PATCH 0/7] More i18n fixes Johannes Sixt
2022-03-21 13:59 ` Ævar Arnfjörð Bjarmason
2022-03-21 19:03 ` Junio C Hamano
2022-03-21 20:13 ` Jean-Noël AVILA
2022-03-21 20:35 ` Jean-Noël AVILA
2022-04-02 16:10 ` [PATCH v2 0/6] " Jean-Noël Avila via GitGitGadget
2022-04-02 16:10 ` [PATCH v2 1/6] i18n: factorize generic failure messages Jean-Noël Avila via GitGitGadget
2022-04-03 5:56 ` Bagas Sanjaya
2022-04-03 14:34 ` Ævar Arnfjörð Bjarmason
2022-04-03 14:47 ` Ævar Arnfjörð Bjarmason
2022-04-02 16:10 ` [PATCH v2 2/6] sequencer: factor GIT_AUTHOR_* from message strings Bagas Sanjaya via GitGitGadget
2022-04-02 16:10 ` [PATCH v2 3/6] i18n: factorize server support messages in fetch-pack Jean-Noël Avila via GitGitGadget
2022-04-02 16:10 ` [PATCH v2 4/6] i18n: factorize "foo does not take arguments" messages Jean-Noël Avila via GitGitGadget
2022-04-03 14:39 ` Ævar Arnfjörð Bjarmason
2022-04-03 22:21 ` Junio C Hamano
2022-04-02 16:10 ` Jean-Noël Avila via GitGitGadget [this message]
2022-04-03 22:29 ` [PATCH v2 5/6] i18n: factorize read-cache error messages Junio C Hamano
2022-04-02 16:10 ` [PATCH v2 6/6] i18n: factorize "bad argument" messages Jean-Noël Avila via GitGitGadget
2022-04-03 14:41 ` Ævar Arnfjörð Bjarmason
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=1888778902aa1d0d2cf118cfb7fe4b2e407953c6.1648915853.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=avarab@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=jn.avila@free.fr \
/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;
as well as URLs for NNTP newsgroup(s).