From 4bdd9e286739e693509547d72f773063b7321d52 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Tue, 4 Nov 2014 08:05:16 +0100 Subject: [PATCH] Re: [PATCH v2 08/10] cli: address: Do not output duplicate addresses --- 8b/cfc9ab414d52891f36055eac5094a192df2a72 | 96 +++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 8b/cfc9ab414d52891f36055eac5094a192df2a72 diff --git a/8b/cfc9ab414d52891f36055eac5094a192df2a72 b/8b/cfc9ab414d52891f36055eac5094a192df2a72 new file mode 100644 index 000000000..8c44ce51e --- /dev/null +++ b/8b/cfc9ab414d52891f36055eac5094a192df2a72 @@ -0,0 +1,96 @@ +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 1C5C9431FC4 + for ; Mon, 3 Nov 2014 23:05:29 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 snuFFBZx9aLm for ; + Mon, 3 Nov 2014 23:05:22 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 1F74F431FAE + for ; Mon, 3 Nov 2014 23:05:22 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1XlYB7-0001pe-DF; Tue, 04 Nov 2014 03:05:21 -0400 +Received: (nullmailer pid 26803 invoked by uid 1000); Tue, 04 Nov 2014 + 07:05:16 -0000 +From: David Bremner +To: Michal Sojka , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 08/10] cli: address: Do not output duplicate addresses +In-Reply-To: <1415058622-21162-9-git-send-email-sojkam1@fel.cvut.cz> +References: <1415058622-21162-1-git-send-email-sojkam1@fel.cvut.cz> + <1415058622-21162-9-git-send-email-sojkam1@fel.cvut.cz> +User-Agent: Notmuch/0.18.2+156~g3cc8ed5 (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Tue, 04 Nov 2014 08:05:16 +0100 +Message-ID: <87a947monn.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +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, 04 Nov 2014 07:05:29 -0000 + +Michal Sojka writes: + +> +> +/* Returns TRUE iff name and addr is duplicate. */ + +If you're revising this patch, it would be good to mention the side +effect of this function. + +> -process_address_list (const search_context_t *ctx, InternetAddressList *list) +> +process_address_list (const search_context_t *ctx, +> + InternetAddressList *list) + +It probably doesn't make any difference, but this looks like a needless +whitespace change. + +This function definitely needs some comment / pointer to +documention. And probably not to have _my in the name. + +> +static void +> +_my_talloc_free_for_g_hash (void *ptr) +> +{ +> + talloc_free (ptr); +> +} +> + + +I don't understand the name of the next subtest + +> +test_begin_subtest "No --output" +> +notmuch address --output=sender --output=recipients '*' >OUTPUT +> +# Use EXPECTED from previous subtest +> +test_expect_equal_file OUTPUT EXPECTED +> + +> + +> +test_done + +nitpick, extra blank lines + +So, AIUI, this is all of the series proposed for 0.19. It looks close to +OK to me, modulo some minor style nits. One anonymous commentator on +IRC mentioned the use of module scope variables, I guess in patch +6/10. I'm not sure of a better solution, but it's true in a perfect +world we wouldn't have module local state. + +d -- 2.26.2