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

Re: [PATCH 00/14] Remove unused code from imap-send.c

From
Jeff King <peff@peff.net>
Date
Jan 14, 2013, 06:06 UTC
Message-ID
<20130114060647.GA4359@sigill.intra.peff.net>
In-Reply-To
<1358141566-26081-1-git-send-email-mhagger@alum.mit.edu>
On Mon, Jan 14, 2013 at 06:32:32AM +0100, Michael Haggerty wrote:
> As discussed before [1], imap-send.c was copied from isync, including
> a lot of code that is not used within the git project.  This patch
> series rips a bunch of it out.
Thanks, this looks like a good direction.

I did not notice any problems reading through the patches, but my brain is frazzled from a day of flying. I missed the problem Jonathan noticed. :)

Some of the things you are removing are for advanced IMAP features that imap-send does not need. In theory, somebody might extend it to use them in the future. But since it has not seen any active feature development in years, and since anybody could resurrect the code by reverting your commits, I don't think it is a big risk.

I suspect you could go even further in ripping things out (e.g., I do not think a server will generate an untagged namespace response at all if we do not ask for it by issuing a namespace command). But you've certainly grabbed the low-hanging fruit that can mostly be verified by the compiler, and I don't know if it's worth the effort to go much further, as it would require a lot of manual verification (and understanding of IMAP, which will rot your brain).

-Peff
Previous: Michael HaggertyNext: Jonathan Nieder
Message 24 of 27 in “Remove unused code from imap-send.c”
  1. 00/14 Remove unused code from imap-send.cMichael Haggerty, Jan 14, 2013
  2. 01/14 imap-send.c: remove msg_data::flags, which was always zeroMichael Haggerty, Jan 14, 2013
  3. Jonathan NiederJan 14, 2013
  4. Michael HaggertyJan 14, 2013
  5. 02/14 imap-send.c: remove struct msg_dataMichael Haggerty, Jan 14, 2013
  6. 03/14 iamp-send.c: remove unused struct imap_store_confMichael Haggerty, Jan 14, 2013
  7. 04/14 imap-send.c: remove struct store_confMichael Haggerty, Jan 14, 2013
  8. 05/14 imap-send.c: remove struct messageMichael Haggerty, Jan 14, 2013
  9. 06/14 imap-send.c: remove some unused fields from struct storeMichael Haggerty, Jan 14, 2013
  10. Jonathan NiederJan 14, 2013
  11. Michael HaggertyJan 14, 2013
  12. 07/14 imap-send.c: inline imap_parse_list() in imap_list()Michael Haggerty, Jan 14, 2013
  13. 08/14 imap-send.c: remove struct imap argument to parse_imap_list_l()Michael Haggerty, Jan 14, 2013
  14. 09/14 imap-send.c: remove namespace fields from struct imapMichael Haggerty, Jan 14, 2013
  15. Jonathan NiederJan 14, 2013
  16. Michael HaggertyJan 14, 2013
  17. 10/14 imap-send.c: remove unused field imap_store::trashncMichael Haggerty, Jan 14, 2013
  18. 11/14 imap-send.c: simplify logic in lf_to_crlf()Michael Haggerty, Jan 14, 2013
  19. Jonathan NiederJan 14, 2013
  20. 12/14 imap-send.c: use struct imap_store instead of struct storeMichael Haggerty, Jan 14, 2013
  21. Jonathan NiederJan 14, 2013
  22. 13/14 imap-send.c: remove unused field imap_store::uidvalidityMichael Haggerty, Jan 14, 2013
  23. 14/14 imap-send.c: fold struct store into struct imap_storeMichael Haggerty, Jan 14, 2013
  24. Jeff KingJan 14, 2013
  25. Jonathan NiederJan 14, 2013
  26. Michael HaggertyJan 14, 2013
  27. Junio C HamanoJan 14, 2013

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.