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