All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: git@vger.kernel.org, Thomas Gummerer <t.gummerer@gmail.com>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v3] send-email: Improve format of smtp initialization error message
Date: Mon, 29 Dec 2014 10:50:46 -0800	[thread overview]
Message-ID: <xmqqppb2z3w9.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1419875601-20836-1-git-send-email-kuleshovmail@gmail.com> (Alexander Kuleshov's message of "Mon, 29 Dec 2014 23:53:21 +0600")

Alexander Kuleshov <kuleshovmail@gmail.com> writes:

> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
>  git-send-email.perl | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 82c6fea..60dcd8d 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1275,10 +1275,10 @@ X-Mailer: git-send-email $gitversion
>  
>  		if (!$smtp) {
>  			die "Unable to initialize SMTP properly. Check config and use --smtp-debug. ",
> -			    "VALUES: server=$smtp_server ",
> -			    "encryption=$smtp_encryption ",
> -			    "hello=$smtp_domain",
> -			    defined $smtp_server_port ? " port=$smtp_server_port" : "";
> +			    "\nVALUES: \n\tserver=$smtp_server ",
> +			    "\n\tencryption=$smtp_encryption ",
> +			    "\n\thello=$smtp_domain",
> +			    defined $smtp_server_port ? " \n\tport=$smtp_server_port" : "";

It may be a good convention to have LF at the beginning of a new
string (i.e. we terminate the old line only when we have something
more to say), but that is true only when we want to end the sentence
without the final newline.  I wonder if that is true in this case;
do we want perl to say "at line # in file X" at the end?

In any case, you have two output lines that ends with a trailing SP
just before LF, which is probably not what you wanted.

If we want to see all lines end with LF, it may be far easier to
read this way:

	die "msg\n",
            "\tvar1=val1\n",
            "\tvar2=val2\n",
            defined $var3 ? "\tvar3=val3\n" : "";

I dunno.

  reply	other threads:[~2014-12-29 18:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29 17:53 [PATCH v3] send-email: Improve format of smtp initialization error message Alexander Kuleshov
2014-12-29 18:50 ` Junio C Hamano [this message]
2014-12-30 10:59   ` Alex Kuleshov
2014-12-30 16:13     ` Junio C Hamano
2015-01-04  9:39       ` Alexander Kuleshov

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=xmqqppb2z3w9.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kuleshovmail@gmail.com \
    --cc=sunshine@sunshineco.com \
    --cc=t.gummerer@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.