git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Andrew Klotz via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Andrew Klotz <agc.klotz@gmail.com>, Andrew Klotz <agc.klotz@gmail.com>
Subject: [PATCH 2/2] formatting for error messages
Date: Fri, 18 Sep 2020 02:17:07 +0000	[thread overview]
Message-ID: <1e9caf1911d3b2663365f4487016499f47390333.1600395427.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.841.git.git.1600395427.gitgitgadget@gmail.com>

From: Andrew Klotz <agc.klotz@gmail.com>

we no longer need to use `N_` instead of `_` here.

we had been using `N_` instead of `_` in the case this function
was being called by with `GIT_TEST_GETTEXT_POISON` leading to an
infinite loop.

Since we have moved `GIT_TEST_GETTEXT_POISON` out of
this function, (it is evaluated as a boolean, not an int)
we no longer need to handle the special case and can use `_`.

Signed-off-by: Andrew Klotz <agc.klotz@gmail.com>
---
 config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config.c b/config.c
index 198d0d3216..624fb30fdd 100644
--- a/config.c
+++ b/config.c
@@ -990,8 +990,8 @@ NORETURN
 static void die_bad_number(const char *name, const char *value)
 {
 	const char *error_type = (errno == ERANGE) ?
-		N_("out of range") : N_("invalid unit");
-	const char *bad_numeric = N_("bad numeric config value '%s' for '%s': %s");
+		_("out of range") : _("invalid unit");
+	const char *bad_numeric = _("bad numeric config value '%s' for '%s': %s");
 
 	if (!value)
 		value = "";
-- 
gitgitgadget

  parent reply	other threads:[~2020-09-18  2:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18  2:17 [PATCH 0/2] config: improve error message for boolean config Andrew Klotz via GitGitGadget
2020-09-18  2:17 ` [PATCH 1/2] " Andrew Klotz via GitGitGadget
2020-09-18 18:10   ` Jeff King
2020-09-18 18:30   ` Phillip Wood
2020-09-18 19:14     ` Junio C Hamano
2020-09-18  2:17 ` Andrew Klotz via GitGitGadget [this message]
2020-09-18 17:22 ` [PATCH 0/2] " Junio C Hamano
2021-02-09  1:25 ` [PATCH v2] " Andrew Klotz via GitGitGadget
2021-02-09 16:51   ` Jeff King
2021-02-09 21:02     ` Junio C Hamano
2021-02-11 20:30   ` [PATCH v3] " Andrew Klotz via GitGitGadget
2021-02-12 10:38     ` Jeff King
2021-02-12 19:52       ` Junio C Hamano

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=1e9caf1911d3b2663365f4487016499f47390333.1600395427.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=agc.klotz@gmail.com \
    --cc=git@vger.kernel.org \
    /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).