threads / patch / 27225

patchgit-send-email: fix missing space in error message

Subject: [PATCH] git-send-email: fix missing space in error message

## tl;dr

4 messages between Apr 29, 2011 and Apr 30, 2011. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Sylvain Rabot· Apr 29, 2011, 18:23 UTC · lore
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
---
 git-send-email.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-send-email.perl +1 −1
diff --git a/git-send-email.perl b/git-send-email.perl
index 76565de..98ab33a 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1091,7 +1091,7 @@ X-Mailer: git-send-email $gitversion
 			    "VALUES: server=$smtp_server ",
 			    "encryption=$smtp_encryption ",
 			    "hello=$smtp_domain",
-			    defined $smtp_server_port ? "port=$smtp_server_port" : "";
+			    defined $smtp_server_port ? " port=$smtp_server_port" : "";
 		}
 
 		if (defined $smtp_authuser) {
-- 
1.7.5
Junio C Hamano· Apr 29, 2011, 18:33 UTC · re: Sylvain Rabot · lore

Re: [PATCH] git-send-email: fix missing space in error message

Sylvain Rabot <sylvain@abstraction.fr> writes:
> Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>

Please keep in mind that these individual commits will eventually need an entry added to Documentation/Relnotes/1.7.5.1.txt where I describe what bug was fixed in a single paragraph, and it almost always talks about how a bug would have been triggered so that the readers can tell if the fix would benefit them.

It would have been perfect if you wrote under what condition the user would see this error message in the body of the commit.

Show 14 quoted lines
> ---
>  git-send-email.perl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 76565de..98ab33a 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1091,7 +1091,7 @@ X-Mailer: git-send-email $gitversion
>  			    "VALUES: server=$smtp_server ",
>  			    "encryption=$smtp_encryption ",
>  			    "hello=$smtp_domain",
> -			    defined $smtp_server_port ? "port=$smtp_server_port" : "";
> +			    defined $smtp_server_port ? " port=$smtp_server_port" : "";

If I were writing this from scratch, I probably would have written it by having leading SP for all options, perhaps like this:

	"VALUES:",
        " option=value",
        " option=value",
        (showoption) ? " option=value" : "",
        (showoption) ? " option=value" : "",
        ...
Thanks.
Junio C Hamano· Apr 29, 2011, 18:37 UTC · re: Junio C Hamano · lore

Re: [PATCH] git-send-email: fix missing space in error message

Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> Sylvain Rabot <sylvain@abstraction.fr> writes:
>
>> Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
>
> Please keep in mind that these individual commits will eventually need an
> entry added to Documentation/Relnotes/1.7.5.1.txt where I describe what
> bug was fixed in a single paragraph, and it almost always talks about how
> a bug would have been triggered so that the readers can tell if the fix
> would benefit them.
>
> It would have been perfect if you wrote under what condition the user
> would see this error message in the body of the commit.
Will queue this; thanks.
Author: Sylvain Rabot <sylvain@abstraction.fr>
Date:   Fri Apr 29 20:23:24 2011 +0200
    git-send-email: fix missing space in error message
    
    When the command cannot make a connection to the SMTP server the error
    message to diagnose the broken configuration is issued.  However, when an
    optional smtp-server-port is given and needs to be reported, the message
    lacked a space between "hello=<smtp-domain>" and "port=<smtp-server-port>".
    
    Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sylvain Rabot· Apr 30, 2011, 07:52 UTC · re: Junio C Hamano · lore

Re: [PATCH] git-send-email: fix missing space in error message

Sorry about that. Was thinking this was not worth an entry in the release note.

On Fri, 2011-04-29 at 11:33 -0700, Junio C Hamano wrote:
Show 39 quoted lines
> Sylvain Rabot <sylvain@abstraction.fr> writes:
> 
> > Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
> 
> Please keep in mind that these individual commits will eventually need an
> entry added to Documentation/Relnotes/1.7.5.1.txt where I describe what
> bug was fixed in a single paragraph, and it almost always talks about how
> a bug would have been triggered so that the readers can tell if the fix
> would benefit them.
> 
> It would have been perfect if you wrote under what condition the user
> would see this error message in the body of the commit.
> 
> > ---
> >  git-send-email.perl |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/git-send-email.perl b/git-send-email.perl
> > index 76565de..98ab33a 100755
> > --- a/git-send-email.perl
> > +++ b/git-send-email.perl
> > @@ -1091,7 +1091,7 @@ X-Mailer: git-send-email $gitversion
> >  			    "VALUES: server=$smtp_server ",
> >  			    "encryption=$smtp_encryption ",
> >  			    "hello=$smtp_domain",
> > -			    defined $smtp_server_port ? "port=$smtp_server_port" : "";
> > +			    defined $smtp_server_port ? " port=$smtp_server_port" : "";
> 
> If I were writing this from scratch, I probably would have written it
> by having leading SP for all options, perhaps like this:
> 
> 	"VALUES:",
>         " option=value",
>         " option=value",
>         (showoption) ? " option=value" : "",
>         (showoption) ? " option=value" : "",
>         ...
> 
> Thanks.

← back to recent threads