{"thread":{"id":"61204","subject":"[PATCH] send-email: add newline for improved readability","startedAt":"2024-03-26T10:04:41Z","lastAt":"2024-03-28T18:32:39Z","messageCount":2,"participants":["Dragan Simic"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"491564","messageId":"6ee28707b9eb8bd8fdfc8756c351455c6bc3bb62.1711447365.git.dsimic@manjaro.org","threadId":"61204","inReplyTo":null,"subject":"[PATCH] send-email: add newline for improved readability","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-03-26T10:04:36Z","receivedAt":"2024-03-26T10:04:41Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"When sending multiple patches at once, without confirming the sending of each\npatch separately, the displayed result statuses of sending each patch become\nbunched together with the messages produced for the subsequent patch.  This\nunnecessarily makes discerning each of the result statuses a bit difficult,\nas visible in the sample output excerpt below:\n\n    ...\n    MIME-Version: 1.0\n    Content-Transfer-Encoding: 8bit\n\n    Result: 250\n    OK. Log says:\n    ...\n\nLet's add a newline after each displayed result status, to make reading the\nproduced outputs much easier, as visible in the sample output excerpt below:\n\n    ...\n    MIME-Version: 1.0\n    Content-Transfer-Encoding: 8bit\n\n    Result: 250\n\n    OK. Log says:\n    ...\n\nThis change also adds a newline after the last produced result status, which\nmay be seen as redundant.  Though, it doesn't look too bad, and making that\nlast newline not displayed would make the code much more complex, which would\nnot be worth neither the time and effort now, nor the additional maintenance\nburden in the future.\n\nWhile there, remove one spotted stray newline in the code.\n\nSigned-off-by: Dragan Simic <dsimic@manjaro.org>\n---\n git-send-email.perl | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 821b2b3a135a..62505ab2707c 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1576,7 +1576,6 @@ sub send_message {\n \t\tprint $sm \"$header\\n$message\";\n \t\tclose $sm or die $!;\n \t} else {\n-\n \t\tif (!defined $smtp_server) {\n \t\t\tdie __(\"The required SMTP server is not properly defined.\")\n \t\t}\n@@ -1686,9 +1685,9 @@ sub send_message {\n \t\tprint $header, \"\\n\";\n \t\tif ($smtp) {\n \t\t\tprint __(\"Result: \"), $smtp->code, ' ',\n-\t\t\t\t($smtp->message =~ /\\n([^\\n]+\\n)$/s), \"\\n\";\n+\t\t\t\t($smtp->message =~ /\\n([^\\n]+\\n)$/s), \"\\n\\n\";\n \t\t} else {\n-\t\t\tprint __(\"Result: OK\\n\");\n+\t\t\tprint __(\"Result: OK\\n\\n\");\n \t\t}\n \t}\n \n"},{"id":"491774","messageId":"6f2cef522326b692d7c4795dcb2676fc@manjaro.org","threadId":"61204","inReplyTo":"6ee28707b9eb8bd8fdfc8756c351455c6bc3bb62.1711447365.git.dsimic@manjaro.org","subject":"Re: [PATCH] send-email: add newline for improved readability","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-03-28T18:32:37Z","receivedAt":"2024-03-28T18:32:39Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"On 2024-03-26 11:04, Dragan Simic wrote:\n> When sending multiple patches at once, without confirming the sending \n> of each\n> patch separately, the displayed result statuses of sending each patch \n> become\n> bunched together with the messages produced for the subsequent patch.  \n> This\n> unnecessarily makes discerning each of the result statuses a bit \n> difficult,\n> as visible in the sample output excerpt below:\n\nJust to clarify, this isn't about making code \"neater\", :) but about \nmaking\nthe outputs more readable.  Perhaps the patch subject could've been \nselected\nbetter, to be more descriptive.\n\n> \n>     ...\n>     MIME-Version: 1.0\n>     Content-Transfer-Encoding: 8bit\n> \n>     Result: 250\n>     OK. Log says:\n>     ...\n> \n> Let's add a newline after each displayed result status, to make reading \n> the\n> produced outputs much easier, as visible in the sample output excerpt \n> below:\n> \n>     ...\n>     MIME-Version: 1.0\n>     Content-Transfer-Encoding: 8bit\n> \n>     Result: 250\n> \n>     OK. Log says:\n>     ...\n> \n> This change also adds a newline after the last produced result status, \n> which\n> may be seen as redundant.  Though, it doesn't look too bad, and making \n> that\n> last newline not displayed would make the code much more complex, which \n> would\n> not be worth neither the time and effort now, nor the additional \n> maintenance\n> burden in the future.\n> \n> While there, remove one spotted stray newline in the code.\n> \n> Signed-off-by: Dragan Simic <dsimic@manjaro.org>\n> ---\n>  git-send-email.perl | 5 ++---\n>  1 file changed, 2 insertions(+), 3 deletions(-)\n> \n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 821b2b3a135a..62505ab2707c 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -1576,7 +1576,6 @@ sub send_message {\n>  \t\tprint $sm \"$header\\n$message\";\n>  \t\tclose $sm or die $!;\n>  \t} else {\n> -\n>  \t\tif (!defined $smtp_server) {\n>  \t\t\tdie __(\"The required SMTP server is not properly defined.\")\n>  \t\t}\n> @@ -1686,9 +1685,9 @@ sub send_message {\n>  \t\tprint $header, \"\\n\";\n>  \t\tif ($smtp) {\n>  \t\t\tprint __(\"Result: \"), $smtp->code, ' ',\n> -\t\t\t\t($smtp->message =~ /\\n([^\\n]+\\n)$/s), \"\\n\";\n> +\t\t\t\t($smtp->message =~ /\\n([^\\n]+\\n)$/s), \"\\n\\n\";\n>  \t\t} else {\n> -\t\t\tprint __(\"Result: OK\\n\");\n> +\t\t\tprint __(\"Result: OK\\n\\n\");\n>  \t\t}\n>  \t}\n"}]}