git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fixed a translation error

From
Junio C Hamano <gitster@pobox.com>
Date
May 4, 2015, 21:29 UTC
Message-ID
<xmqqlhh4owv2.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150504211839.GX5467@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 6 quoted lines
> While we're here, start the error messages with a lowercase letter to
> match the usual typography of error messages.
>
> A quick web search and a code search at codesearch.debian.net finds no
> scripts trying to parse these error messages, so this change should be
> safe.
Very well thought through and nicely written.

I am tempted to pick this patch up and queue it on its own. Alengi, if you want to add _() markings to this file, perhaps it is a good idea to base your patch relative to (i.e. on top of) Jonathan's patch.

Thanks.
Show 28 quoted lines
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
>  builtin/config.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/config.c b/builtin/config.c
> index d32c532..89f3208 100644
> --- a/builtin/config.c
> +++ b/builtin/config.c
> @@ -193,7 +193,7 @@ static int get_value(const char *key_, const char *regex_)
>  
>  		key_regexp = (regex_t*)xmalloc(sizeof(regex_t));
>  		if (regcomp(key_regexp, key, REG_EXTENDED)) {
> -			fprintf(stderr, "Invalid key pattern: %s\n", key_);
> +			error("invalid key pattern: %s", key_);
>  			free(key_regexp);
>  			key_regexp = NULL;
>  			ret = CONFIG_INVALID_PATTERN;
> @@ -214,7 +214,7 @@ static int get_value(const char *key_, const char *regex_)
>  
>  		regexp = (regex_t*)xmalloc(sizeof(regex_t));
>  		if (regcomp(regexp, regex_, REG_EXTENDED)) {
> -			fprintf(stderr, "Invalid pattern: %s\n", regex_);
> +			error("invalid pattern: %s", regex_);
>  			free(regexp);
>  			regexp = NULL;
>  			ret = CONFIG_INVALID_PATTERN;
Previous: Jonathan Nieder
Message 3 of 3 in “Fixed a translation error”
  1. Fixed a translation errorAlangi Derick, May 4, 2015
  2. Jonathan NiederMay 4, 2015
  3. Junio C HamanoMay 4, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.