Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Cc: git@vger.kernel.org
Subject: Re: [Squash PATCH] fprintf(stderr, "Warning...") -> warning("...")
Date: Mon, 28 Dec 2009 01:24:05 -0800	[thread overview]
Message-ID: <7vy6kntpsa.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 1261651279-29041-1-git-send-email-ilari.liusvaara@elisanet.fi

Ilari Liusvaara <ilari.liusvaara@elisanet.fi> writes:

> Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
> ---
>  transport-helper.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
>
> This fixes the small nit about fprintf(stderr, "Warning: ") by using
> warning() API. 
>
> It can be appiled on top of "Support remote helpers implementing smart
> transports" or squashed to it.

Thanks; will squash but with two minor touch-ups:

 - warning() adds its own terminating LF so we need to drop it from the caller;

 - being able to grep for an error/warning message is more important than
   keeping the source line strictly shorter than 80-columns.

> diff --git a/transport-helper.c b/transport-helper.c
> index 55427df..8c8ca8e 100644
> --- a/transport-helper.c
> +++ b/transport-helper.c
> @@ -420,11 +420,10 @@ static int process_connect_service(struct transport *transport,
>  	if (strcmp(name, exec)) {
>  		r = set_helper_option(transport, "servpath", exec);
>  		if (r > 0)
> -			fprintf(stderr, "Warning: Setting remote service path "
> -				"not supported by protocol.\n");
> +			warning("Setting remote service path not supported "
> +				"by protocol.\n");
>  		else if (r < 0)
> -			fprintf(stderr, "Warning: Invalid remote service "
> -				"path.\n");
> +			warning("Invalid remote service path.\n");
>  	}
>  
>  	if (data->connect)
> -- 
> 1.6.6.3.gaa2e1

      reply	other threads:[~2009-12-28  9:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-24 10:41 [Squash PATCH] fprintf(stderr, "Warning...") -> warning("...") Ilari Liusvaara
2009-12-28  9:24 ` Junio C Hamano [this message]

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=7vy6kntpsa.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ilari.liusvaara@elisanet.fi \
    /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