[PATCH v2 0/7] lib: replace the message header parser with gmime
authorJani Nikula <jani@nikula.org>
Sat, 30 Nov 2013 15:33:49 +0000 (17:33 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:58:31 +0000 (09:58 -0800)
78/b10b32c5a2c6ac6538c49c12809f3d517abf15 [new file with mode: 0644]

diff --git a/78/b10b32c5a2c6ac6538c49c12809f3d517abf15 b/78/b10b32c5a2c6ac6538c49c12809f3d517abf15
new file mode 100644 (file)
index 0000000..d6ead27
--- /dev/null
@@ -0,0 +1,105 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 68462431FD4\r
+       for <notmuch@notmuchmail.org>; Sat, 30 Nov 2013 07:34:11 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 5un8u8RWDvjG for <notmuch@notmuchmail.org>;\r
+       Sat, 30 Nov 2013 07:34:03 -0800 (PST)\r
+Received: from mail-ea0-f175.google.com (mail-ea0-f175.google.com\r
+       [209.85.215.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 418E6431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 30 Nov 2013 07:34:03 -0800 (PST)\r
+Received: by mail-ea0-f175.google.com with SMTP id z10so7575028ead.20\r
+       for <notmuch@notmuchmail.org>; Sat, 30 Nov 2013 07:34:00 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:cc:subject:date:message-id;\r
+       bh=Jp1PsVMY6bTG4GeGxnbnek4kDMlme+0A1DrxPE4+S9s=;\r
+       b=Z9eHU4zLOM7t8eoI4neqzfrRH8OXFc1g+w5K7paL5T4xn9cfduePi44wSouK7mXRM1\r
+       CUdlPqX74bBqBGMLKzGMo13P7B2aO8SC74H0TwdQR+JPka3NLfIeuL6tQ1FkGjfVE15I\r
+       DW99BFAAbp/azdmvM1/lIZOkZQAHRh+V3EFtD2YCwntACb+vQFryMVVcvCOMwh2gKV0w\r
+       cHWhyMomHmwTY5GUvlcd9lnbuoi+1CiozqQi/Cyw8Kix7F8C2+EGm/ldHK0yZhGtdJ5y\r
+       2YPZYjqmfQ/6c0VRCMVU+mhAFi02OFcORb86eKKwl0MZjHS9Tct0yOK3ZZxLLuNFV2n4\r
+       ztJA==\r
+X-Gm-Message-State:\r
+ ALoCoQm54+gQuf3n6B9KF12X9WLsSpMsIvH5odqAJEmhGLKN+w1xsroVBpnuMmkj029Eeu0VEJC2\r
+X-Received: by 10.14.9.131 with SMTP id 3mr1601964eet.45.1385825640814;\r
+       Sat, 30 Nov 2013 07:34:00 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+       [88.195.111.91])\r
+       by mx.google.com with ESMTPSA id 44sm51851193eek.5.2013.11.30.07.33.59\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sat, 30 Nov 2013 07:34:00 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 0/7] lib: replace the message header parser with gmime\r
+Date: Sat, 30 Nov 2013 17:33:49 +0200\r
+Message-Id: <cover.1385825425.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.8.4.2\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 30 Nov 2013 15:34:11 -0000\r
+\r
+This is v2 of id:cover.1381948853.git.jani@nikula.org with more polish.\r
+\r
+Patches 1-4 do prep work to fix some of the differences in the parsers\r
+in advance. Arguably they are not that bad regardless of the parser\r
+change.\r
+\r
+Patches 5-6 actually make the change. Having two patches is a somewhat\r
+artificial division, but perhaps makes it easier to review.\r
+\r
+Patch 7 is just a hack to make perf tests not ignore so many mails... we\r
+have quite a bit of non-emails in the corpus by gmime parser\r
+standards. And this illustrates one of the differences in the parsers.\r
+\r
+\r
+BR,\r
+Jani.\r
+\r
+Jani Nikula (7):\r
+  cli: sanitize tabs and newlines to spaces in notmuch search\r
+  cli: refactor reply from guessing\r
+  util: make sanitize string available in string util for reuse\r
+  cli: sanitize the received header before scanning for replies\r
+  lib: replace the header parser with gmime\r
+  lib: parse messages only once\r
+  HACK: fix broken messages in the perf test corpus\r
+\r
+ lib/database.cc                   |   6 +-\r
+ lib/index.cc                      |  70 +-------\r
+ lib/message-file.c                | 351 +++++++++++++-------------------------\r
+ lib/message.cc                    |   6 +\r
+ lib/notmuch-private.h             |  20 ++-\r
+ notmuch-reply.c                   | 186 ++++++++++++--------\r
+ notmuch-search.c                  |  17 --\r
+ performance-test/perf-test-lib.sh |   4 +\r
+ test/search-output                |   2 +-\r
+ util/string-util.c                |  22 +++\r
+ util/string-util.h                |   7 +\r
+ 11 files changed, 297 insertions(+), 394 deletions(-)\r
+\r
+-- \r
+1.8.4.2\r
+\r