From 6b0f1554a60a648d98e08ba280b1bd74f4ae2dc8 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 10 Apr 2016 08:02:16 +2100 Subject: [PATCH] Re: [PATCH v4 1/7] test: add test-binary to print the number of ghost messages --- f6/01d2b374931700e39a5fe6c5085b62a7d3a71a | 66 +++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 f6/01d2b374931700e39a5fe6c5085b62a7d3a71a diff --git a/f6/01d2b374931700e39a5fe6c5085b62a7d3a71a b/f6/01d2b374931700e39a5fe6c5085b62a7d3a71a new file mode 100644 index 000000000..4c7a363c1 --- /dev/null +++ b/f6/01d2b374931700e39a5fe6c5085b62a7d3a71a @@ -0,0 +1,66 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 8CE926DE028C + for ; Sat, 9 Apr 2016 04:02:28 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.019 +X-Spam-Level: +X-Spam-Status: No, score=-0.019 tagged_above=-999 required=5 + tests=[AWL=-0.008, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Tc_UpnuffJxL for ; + Sat, 9 Apr 2016 04:02:20 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id A9A346DE0173 + for ; Sat, 9 Apr 2016 04:02:20 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1aoqep-0008Ue-DT; Sat, 09 Apr 2016 07:02:27 -0400 +Received: (nullmailer pid 17852 invoked by uid 1000); + Sat, 09 Apr 2016 11:02:16 -0000 +From: David Bremner +To: Daniel Kahn Gillmor , + Notmuch Mail +Subject: Re: [PATCH v4 1/7] test: add test-binary to print the number of ghost + messages +In-Reply-To: <1460166892-29721-1-git-send-email-dkg@fifthhorseman.net> +References: <1459445693-3900-1-git-send-email-dkg@fifthhorseman.net> + <1460166892-29721-1-git-send-email-dkg@fifthhorseman.net> +User-Agent: Notmuch/0.21+99~gd93d377 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Sat, 09 Apr 2016 08:02:16 -0300 +Message-ID: <877fg73v0n.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Sat, 09 Apr 2016 11:02:28 -0000 + +Daniel Kahn Gillmor writes: + + +> + if (argc < 2) { +> + std::cerr << "usage: ghost-report xapian-dir" << std::endl; +> + } +> + +> + Xapian::Database db(argv[1]); +> + std::cout << db.get_termfreq("Tghost") << std::endl; +> +} + +It's completely my fault, but this should have an exit(1) after printing +the error message. -- 2.26.2