git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC] git-imap-send: use libcurl for implementation

From
Jeff King <peff@peff.net>
Date
Aug 17, 2014, 18:42 UTC
Message-ID
<20140817184252.GB2200@peff.net>
In-Reply-To
<53F0A66A.9000909@raz.or.at>
On Sun, Aug 17, 2014 at 02:56:10PM +0200, Bernhard Reiter wrote:
Show 13 quoted lines
> > I'm not sure if that would cause problems on Windows,
> > though.
> 
> Apparently socketpair is not available there. Googling "socketpair
> windows" yields, among a lot of other useful resources, the following
> relatively actively maintained ~150 LOC, BSD-3-clause-licensed,
> implementation:
> 
> https://github.com/ncm/selectable-socketpair
> 
> That license is GPL compatible, so should we consider including that
> implementation with git? That's the kind of stuff that goes to
> compat/win32, right?

Thanks for researching. Sticking that in compat/ would be our usual strategy, yes.

Show 8 quoted lines
> > I'm not sure I understand this comment. Even if SSL is not in use,
> > wouldn't we be passing a regular pipe to curl, which would break?
> 
> Yeah, we can't do that, and thus would have to keep the handwritten IMAP
> implementation just for the tunnel case (allowing to drop only the
> OpenSSL specific stuff), see my other email:
> http://www.mail-archive.com/git@vger.kernel.org/msg56791.html (the
> relevant part is pretty far down at the bottom).

I'd really love it if we could make this work with tunnels and eventually get rid of the hand-written imap code entirely. I agree with Jonathan that we probably need to keep it around a bit for people on older curl, but dropping it is a good goal in the long run. That code was forked from the isync project, but mangled enough that we could not take bug fixes from upstream. As not many people use imap-send, I suspect it is largely unmaintained and the source of many lurking bugs[1]. Replacing it with curl's maintained implementation is probably a good step.

-Peff
[1] That's my somewhat subjective opinion, but I feel like I have seen
    several bugs reported in imap-send that had literally been there for
    years. And having worked on IMAP implementations in a past life, I
    know there are many dark corners of the protocol that vary from
    server to server.
Previous: Bernhard ReiterNext: Bernhard Reiter
Message 5 of 7 in “git-imap-send: use libcurl for implementation”
  1. git-imap-send: use libcurl for implementationBernhard Reiter, Aug 12, 2014
  2. Jonathan NiederAug 13, 2014
  3. Jeff KingAug 17, 2014
  4. Bernhard ReiterAug 17, 2014
  5. Jeff KingAug 17, 2014
  6. Bernhard ReiterAug 19, 2014
  7. Junio C HamanoAug 19, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.