On 08/24/2016 02:49 PM, Eric Wong wrote:
>> On Tue, 23 Aug 2016, Arif Khokar wrote:

>>> Given that public-inbox provides an NNTP interface, couldn't the ARTICLE
>>> <message-id> NNTP command be used to easily retrieve the messages in a
>>> given patch series (at least compared to POP or IMAP).  Perhaps
>>> git-send-email could be modified to include the message-id value of each
>>> patch in the series that it sends to the mailing list and include it in
>>> the cover letter.
>
> I think that makes sense; perhaps an X-Git-Followups: header
> from send-email which lists the child Message-IDs the same way
> References: does for ancestors.

That sounds like a better idea compared to what I came up with 
originally and it would be much easier to parse out of the downloaded 
cover letter message headers as opposed to looking for 
delimiters/keywords in the message body.

> (perhaps there's already a standardized header for listing children)

I don't recall ever seeing anything like that in any RFC or message 
header I've read through.  It's an interesting idea though.

> I thought about allowing a giant MIME message with all the
> patches attached, too but that won't work for a large patch
> series due to size limits along various SMTP hops.

I think the vast majority of SMTP servers allow several megabyte 
messages though their configured policy.  I can't speak for those who 
use their own SMTP servers though.  NNTP servers may limit an individual 
message to a megabyte or less though.

> Compression might make spam filters unhappy, too.

Perhaps, but there should be more reliance on IP blacklists and DMARC as 
a first line of defense against SPAM.

>>> Then a script could be written (i.e., git-download-patch) which could
>>> parse the cover letter message (specified using its message-id), and
>>> download all the patches in series, which can then be applied using
>>> git-am.  This would in fact take the email client out of the equation in
>>> terms of saving patches.
>
>       w3m -dump -dump_source nntp://<NNTP-server>/<Message-ID>
>
> ought to already work for news.gmane.org and news.public-inbox.org

That's interesting.  I didn't know w3m was capable of that.  But, given 
the way you specified it, it doesn't show the article headers. 
Replacing the -dump and -dump_source options with -dump_both would 
display the headers as well.

> The Net::NNTP Perl module is a standard part of the Perl distro
> for many years, now (along with Net::SMTP), so that would not
> be a roadblock for implementing a custom downloader distributed
> with git.

I wrote a prototype one and included it in my response to Johannes in 
<dm5pr17mb1353b99ebd5f4fd23360dd41d3...@dm5pr17mb1353.namprd17.prod.outlook.com>.
 
  It could be used as a starting point in terms of making it easier to 
download patches to apply with git-am (without having to rely on one's 
MUA or the tooling around it).

Reply via email to