From: Stefan Agner <stefan@agner.ch>
To: Juston Li <juston.h.li@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git send-email Connection Closed
Date: Fri, 24 Jul 2015 16:26:52 +0200 [thread overview]
Message-ID: <66194061e3b38a203af399ba4fd8e4be@agner.ch> (raw)
In-Reply-To: <91a8d8eb8767d29a4ed0a96d7a633c37@agner.ch>
On 2015-07-24 14:59, Stefan Agner wrote:
> Hi Juston,
>
> On 2015-07-15 07:11, Juston Li wrote:
>> Recently, I have had trouble using git send-email to send a patchset.
>> After the confirmation to send the email I get the following:
>> Send this email? ([y]es|[n]o|[q]uit|[a]ll): y
>> [Net::SMTP::SSL] Connection closed at /usr/lib/git-core/git-send-email
>> line 1320.
>> fatal: 'send-email' appears to be a git command, but we were not
>> able to execute it. Maybe git-send-email is broken?
>>
>> This message first appeared when I tried to send a 19 commit patchset
>> via 'git send-email HEAD~19'. It also fails when I try to format-patch
>> and send the patchset separately via 'git send-email 0001...'
>> Oddly enough, it works when I send anything other than 19 commits
>> for example 'git send-email HEAD~1' or 'git send-email HEAD~20'
>
> Just got a similar message here, without the fatal part, just:
> [Net::SMTP::SSL] Connection closed at /usr/lib/git-core/git-send-email
> line 1320.
>
> It seems that only one patch is causing the problem (in my case the
> first after the cover letter). I use TLS too and send it over a postfix
> SMTP server I maintain myself. The postfix log shows this:
>
> postfix/smtpd[8535]: lost connection after DATA (16357 bytes) from
> unknown[x.y.z.z]
> postfix/smtpd[8535]: disconnect from unknown[x.y.z.z]
>
> So it seems that the client side disconnects?
>
> I rerun the command with --smtp-debug=1
>
> ...
> Net::SMTP::SSL=GLOB(0x1fb3558)>>> +MODULE_LICENSE("GPL");
> Net::SMTP::SSL=GLOB(0x1fb3558)>>> --
> Net::SMTP::SSL=GLOB(0x1fb3558)>>> 2.4.5
> Net::SMTP::SSL: Net::Cmd::datasend(): unexpected EOF on command channel:
> at /usr/lib/git-core/git-send-email line 1320.
> [Net::SMTP::SSL] Connection closed at /usr/lib/git-core/git-send-email
> line 1320.
>
> It seems to me that there is a size limit, after cutting down the patch
> to ~16K, sending started to work. I cut it twice, once by removing lines
> from the head and once from the bottom, in both cases at the size of
> around 16K I could send the patch.
I found a work-around by using datasend line by line, which did the job
for me:
Altering /usr/lib/git-core/git-send-email, around line 1320:
$smtp->datasend("$header\n") or die $smtp->message;
my @lines = split /^/, $message;
foreach my $line (@lines) {
$smtp->datasend("$line") or die $smtp->message;
}
--
Stefan
prev parent reply other threads:[~2015-07-24 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 5:11 git send-email Connection Closed Juston Li
2015-07-15 22:00 ` Mike Rappazzo
2015-07-16 2:43 ` Juston Li
2015-07-24 12:59 ` Stefan Agner
2015-07-24 14:26 ` Stefan Agner [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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=66194061e3b38a203af399ba4fd8e4be@agner.ch \
--to=stefan@agner.ch \
--cc=git@vger.kernel.org \
--cc=juston.h.li@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).