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

Re: imap-send badly handles commit bodies beginning with "From <"

From
Jeff King <peff@peff.net>
Date
Oct 28, 2011, 21:37 UTC
Message-ID
<20111028213703.GA1454@sigill.intra.peff.net>
In-Reply-To
<20111028212122.GB3966@foghorn.codeweavers.com>
On Fri, Oct 28, 2011 at 04:21:22PM -0500, Andrew Eikum wrote:
> Since we have a program called "mailsplit," wouldn't it make more
> sense to have imap-send use its implementation to split mail instead
> of sharing just the From line detection?

Potentially, yeah. I was thinking of just pulling over the from line detection (which is the real black magic bit), but it looks like imap-send's mbox handling could use some general attention (maybe it would be possible to not read the entire mbox into memory, for example).

Show 7 quoted lines
> I was hoping it'd be a quick matter of pulling mailsplit's
> implementation out of builtin and into the top level, but I see it's
> got some global variables that are tangled enough that I actually have
> to understand the code before I can pull it apart :)
>
> If no one beats me to it, I'll work on this next week. It's late on
> Friday and I'm moving house this weekend.
No rush. Let us know if you have questions.
Show 6 quoted lines
> Quick question, since I'm not intimately familiar with Git's code: I
> was thinking of creating a new compilation unit at the top level,
> mailutils.{c,h}, and referencing it from both imap-send.c and
> builtin/splitmail.c. Does that seem like the right approach? Is there
> an existing compilation unit I should be placing splitmail's guts into
> instead?

Yes, I think a new file makes sense here. Make sure to update LIB_H and LIB_OBJS in the Makefile.

-Peff
Previous: Andrew EikumNext: Magnus Bäck
Message 4 of 8 in “imap-send badly handles commit bodies beginning with "From <"”
  1. Andrew EikumOct 28, 2011
  2. Jeff KingOct 28, 2011
  3. Andrew EikumOct 28, 2011
  4. Jeff KingOct 28, 2011
  5. Magnus BäckOct 30, 2011
  6. Jeff KingNov 1, 2011
  7. Michael HaggertyNov 1, 2011
  8. Jeff KingNov 1, 2011

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.