public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jonathan Nieder <jrnieder@gmail•com>
Cc: Alangi Derick <alangiderick@gmail•com>, git@vger•kernel.org
Subject: Re: [PATCH] Fixed a translation error
Date: Mon, 04 May 2015 14:29:05 -0700	[thread overview]
Message-ID: <xmqqlhh4owv2.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150504211839.GX5467@google.com> (Jonathan Nieder's message of "Mon, 4 May 2015 14:18:39 -0700")

Jonathan Nieder <jrnieder@gmail•com> writes:

> 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.

>
> 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;

  reply	other threads:[~2015-05-04 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 11:16 [PATCH] Fixed a translation error Alangi Derick
2015-05-04 21:18 ` Jonathan Nieder
2015-05-04 21:29   ` Junio C Hamano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-04 11:16 Alangi Derick

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=xmqqlhh4owv2.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=alangiderick@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jrnieder@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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