Re: [PATCH 1/7] Split notmuch_database_close into two functions
authorMark Walters <markwalters1009@gmail.com>
Tue, 17 Apr 2012 08:37:44 +0000 (09:37 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:30 +0000 (09:46 -0800)
d0/2b05ff6841c817f41c5d6cb8e0f254f7347306 [new file with mode: 0644]

diff --git a/d0/2b05ff6841c817f41c5d6cb8e0f254f7347306 b/d0/2b05ff6841c817f41c5d6cb8e0f254f7347306
new file mode 100644 (file)
index 0000000..d5eb300
--- /dev/null
@@ -0,0 +1,128 @@
+Return-Path: <m.walters@qmul.ac.uk>\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 9A66F431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Apr 2012 01:37:35 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+       tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+       NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 WshSGtR6uV+Q for <notmuch@notmuchmail.org>;\r
+       Tue, 17 Apr 2012 01:37:31 -0700 (PDT)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id A1782431FAE\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Apr 2012 01:37:31 -0700 (PDT)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+       by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1SK3ue-0002QC-1i; Tue, 17 Apr 2012 09:37:27 +0100\r
+Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
+       helo=localhost)\r
+       by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1SK3ud-00010S-MY; Tue, 17 Apr 2012 09:37:23 +0100\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Justus Winter <4winter@informatik.uni-hamburg.de>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/7] Split notmuch_database_close into two functions\r
+In-Reply-To: <20120416215112.15615.94985@thinkbox.jade-hamburg.de>\r
+References:\r
+ <1332291311-28954-1-git-send-email-4winter@informatik.uni-hamburg.de>\r
+       <1332291311-28954-2-git-send-email-4winter@informatik.uni-hamburg.de>\r
+       <87fwcopu5g.fsf@qmul.ac.uk>\r
+       <20120416215112.15615.94985@thinkbox.jade-hamburg.de>\r
+User-Agent: Notmuch/0.12+110~gbc97b4a (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Tue, 17 Apr 2012 09:37:44 +0100\r
+Message-ID: <87pqb64uuf.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 94.192.233.223\r
+X-QM-SPAM-Info: Sender has good ham record.  :)\r
+X-QM-Body-MD5: 46f84ad4cd2a182d99bd7237e6c3a1e0 (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.8\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+       determine if it is\r
+       spam. We require at least 5.0 points to mark a message as spam.\r
+       This message scored -1.8 points.\r
+       Summary of the scoring: \r
+       * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+       *      medium trust\r
+       *      [138.37.6.40 listed in list.dnswl.org]\r
+       * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+       provider *      (markwalters1009[at]gmail.com)\r
+       * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+       *      domain\r
+       *  0.5 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\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: Tue, 17 Apr 2012 08:37:35 -0000\r
+\r
+On Mon, 16 Apr 2012, Justus Winter <4winter@informatik.uni-hamburg.de> wrote:\r
+> Quoting Mark Walters (2012-03-31 19:17:15)\r
+>> Secondly, I think the patch series could be made clearer and easier to\r
+>> review. If you do it in three steps\r
+>> \r
+>> 1) change of notmuch_database_close to notmuch_database_destroy (just\r
+>>    the function name change)\r
+>> 2) split the new notmuch_database_destroy into two as in the current\r
+>>    first patch\r
+>> 3) Make any changes (if there are any) of notmuch_database_destroy to\r
+>>    notmuch_database_close.\r
+>> \r
+>> The advantage is that the first change is easy to test (essentially does\r
+>> it build) and then changes from notmuch_database_destroy to\r
+>> notmuch_database_close in step 3 are explicit rather than the current\r
+>> situation where we need to grep the code to see if some instances of\r
+>> notmuch_database_close were not changed to notmuch_database_destroy.\r
+>\r
+> I don't buy it. The patch series first touches the library and\r
+> documentation and the lib compiles fine. The next patch updates the\r
+> cli tools, all of them compile fine afterwards.\r
+>\r
+> Every patch addresses the issue component wise, this seems rather\r
+> natural for me.\r
+\r
+I will try an explain my concern better. I assume that the patch\r
+actually introduces a functional change : that is something somewhere in\r
+the code calls the new notmuch_database_close instead of\r
+notmuch_database_destroy [1]. In your current patch series someone\r
+reading the patches alone can't see the functional change: it comes from\r
+the occurrences of notmuch_database_close that you *don't* change to\r
+notmuch_database_destroy.\r
+\r
+Indeed, if the only change is to allow out-of-tree code access to the\r
+new notmuch_database_close function then doing the patch series as\r
+\r
+rename notmuch_database_close to notmuch_database_destroy\r
+\r
+Then split notmuch_database_destroy make it clearer. (And if the code\r
+compiles after step 1 then I know *all* occurrences of\r
+notmuch_database_close have been changed to notmuch_database_destroy).\r
+\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+[1] Apart, of course, from notmuch_database_destroy.\r
+\r