1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id EBF34431FDA
\r
6 for <notmuch@notmuchmail.org>; Sun, 3 Nov 2013 04:26:16 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id gprnyPHfA4T5 for <notmuch@notmuchmail.org>;
\r
17 Sun, 3 Nov 2013 04:26:10 -0800 (PST)
\r
18 Received: from mail-ea0-f172.google.com (mail-ea0-f172.google.com
\r
19 [209.85.215.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 4157B431FAF
\r
22 for <notmuch@notmuchmail.org>; Sun, 3 Nov 2013 04:25:21 -0800 (PST)
\r
23 Received: by mail-ea0-f172.google.com with SMTP id r16so2911479ead.31
\r
24 for <notmuch@notmuchmail.org>; Sun, 03 Nov 2013 04:25:20 -0800 (PST)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=1e100.net; s=20130820;
\r
27 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
28 :references:in-reply-to:references;
\r
29 bh=lE4fv1b5SUE5rbOPhOJQcOWPRNonmPzs1hBc0zd36Ew=;
\r
30 b=hYaP0Sa1xUUH3yE99t3cdr2CbHll0/SMDyW5qTbgm6newvM690htJ37W2pKVtiC7RN
\r
31 2GzsH9AKZcbIjmbSVgO9GbvU47tSYTmBxUrQBxuOfW3IkSyblzzhSCqY69iwnKNtN1fs
\r
32 dvr7AkbCjfd1H5TpOwS+JGHP39oFo7dxL9zQ5RcJWYaJ7RzENR1g5mVt5c4lzTKCJ3SL
\r
33 KREUX5toE0B+VymF3IYG+lvkt6+AyIrWTrKjaXE9D92jHRcpMb9FbxgSdxA6iqWVi7on
\r
34 GV7kDIixqJ4gUoadMs+hdnaaD2C0HPUphNFh3YvmVKOeTID7p6ureBwU4y4XDbuwn8Y+
\r
37 ALoCoQn+acWHJ9UXX+iFihwB2/yUzDyY7Nu9zBufH0LQKAWptdTC5zSvlRc/GtCr+v9mP+M29RBw
\r
38 X-Received: by 10.15.99.72 with SMTP id bk48mr12722679eeb.22.1383481519991;
\r
39 Sun, 03 Nov 2013 04:25:19 -0800 (PST)
\r
40 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.
\r
42 by mx.google.com with ESMTPSA id k7sm32796672eeg.13.2013.11.03.04.25.18
\r
43 for <multiple recipients>
\r
44 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
45 Sun, 03 Nov 2013 04:25:19 -0800 (PST)
\r
46 From: Jani Nikula <jani@nikula.org>
\r
47 To: notmuch@notmuchmail.org
\r
48 Subject: [PATCH v2 10/11] cli: add compact --verbose option and silence output
\r
50 Date: Sun, 3 Nov 2013 14:24:50 +0200
\r
52 <3d33996df44b338847dac930b6cd294c57b6e54b.1383481295.git.jani@nikula.org>
\r
53 X-Mailer: git-send-email 1.8.4.rc3
\r
54 In-Reply-To: <cover.1383481295.git.jani@nikula.org>
\r
55 References: <cover.1383481295.git.jani@nikula.org>
\r
56 In-Reply-To: <cover.1383481295.git.jani@nikula.org>
\r
57 References: <cover.1383481295.git.jani@nikula.org>
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Sun, 03 Nov 2013 12:26:17 -0000
\r
72 If there's nothing surprising to say, don't say anything. Unless asked
\r
75 notmuch-compact.c | 16 +++++++++++-----
\r
76 1 file changed, 11 insertions(+), 5 deletions(-)
\r
78 diff --git a/notmuch-compact.c b/notmuch-compact.c
\r
79 index 359acfc..1e7808c 100644
\r
80 --- a/notmuch-compact.c
\r
81 +++ b/notmuch-compact.c
\r
82 @@ -32,27 +32,33 @@ notmuch_compact_command (notmuch_config_t *config, int argc, char *argv[])
\r
83 const char *path = notmuch_config_get_database_path (config);
\r
84 const char *backup_path = NULL;
\r
85 notmuch_status_t ret;
\r
86 + notmuch_bool_t verbose;
\r
89 notmuch_opt_desc_t options[] = {
\r
90 { NOTMUCH_OPT_STRING, &backup_path, "backup", 0, 0 },
\r
91 + { NOTMUCH_OPT_BOOLEAN, &verbose, "verbose", 'v', 0 },
\r
94 opt_index = parse_arguments (argc, argv, options, 1);
\r
98 - printf ("Compacting database...\n");
\r
99 - ret = notmuch_database_compact (path, backup_path, status_update_cb, NULL);
\r
101 + printf ("Compacting database...\n");
\r
102 + ret = notmuch_database_compact (path, backup_path,
\r
103 + verbose ? status_update_cb : NULL, NULL);
\r
105 fprintf (stderr, "Compaction failed: %s\n", notmuch_status_to_string(ret));
\r
110 - printf ("The old database has been moved to %s.\n", backup_path);
\r
113 + printf ("The old database has been moved to %s.\n", backup_path);
\r
115 - printf ("Done.\n");
\r
116 + printf ("Done.\n");
\r