Re: [PATCHv3] notmuch-show: include Bcc header in json output
[notmuch-archives.git] / c0 / b89c2ade42744346c2d9c81c342841e563714a
1 Return-Path: <novalazy@gmail.com>\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 8D090431FBF\r
6         for <notmuch@notmuchmail.org>; Fri, 13 Apr 2012 18:43:36 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, 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 2AKb3fQvrL8N for <notmuch@notmuchmail.org>;\r
17         Fri, 13 Apr 2012 18:43:36 -0700 (PDT)\r
18 Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com\r
19         [209.85.210.45]) (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 0CC19431FAE\r
22         for <notmuch@notmuchmail.org>; Fri, 13 Apr 2012 18:43:35 -0700 (PDT)\r
23 Received: by dacx6 with SMTP id x6so4544874dac.18\r
24         for <notmuch@notmuchmail.org>; Fri, 13 Apr 2012 18:43:35 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=lmn8Aj6p+epysJlCbiJEigYuq4f8RB5x6He9rAQDvaU=;\r
28         b=lOjcKBmt/uT6C7E7aKD6wt5KCvvv9LFcA6Y5Gv5Ckuco+6u45bANDaWXG/PFR/qOMF\r
29         hBZGxcEF6oJUXmUpuRYJ8rs0TMrOQOQEz/bafolnTukt+BVb36jvg6R/1+d/CudiF1k/\r
30         QTAltpm405/AN2GvCoT1nRmvsbm0JhnZqChNnHrWZ9uJxkIRkPgcz4w+ph/ZvCpaVM5x\r
31         2qHcTeo2H159j+clakLk2j2kRX+luQL7s/LBSMYAvGgt4Cqc0xPb42geLBf9mqcRW2t9\r
32         ZF4mx/hcHdHXJox+/DxPvUXElfHpKBsK3Kf7h7xbvhzLom20Za6engNsIG7qcS4R+zKQ\r
33         KjlA==\r
34 Received: by 10.68.204.234 with SMTP id lb10mr8752105pbc.161.1334367815380;\r
35         Fri, 13 Apr 2012 18:43:35 -0700 (PDT)\r
36 Received: from localhost (215.42.233.220.static.exetel.com.au.\r
37         [220.233.42.215])\r
38         by mx.google.com with ESMTPS id y5sm10267958pbk.5.2012.04.13.18.43.31\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Fri, 13 Apr 2012 18:43:34 -0700 (PDT)\r
41 From: Peter Wang <novalazy@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH v4 2/6] config: Check 'config get' arity exactly\r
44 Date: Sat, 14 Apr 2012 11:41:02 +1000\r
45 Message-Id: <1334367666-10954-3-git-send-email-novalazy@gmail.com>\r
46 X-Mailer: git-send-email 1.7.4.4\r
47 In-Reply-To: <1334367666-10954-1-git-send-email-novalazy@gmail.com>\r
48 References: <1332282698-7951-1-git-send-email-novalazy@gmail.com>\r
49         <1334367666-10954-1-git-send-email-novalazy@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Sat, 14 Apr 2012 01:43:36 -0000\r
63 \r
64 Require that 'config get' is passed exactly one additional argument,\r
65 instead of silently ignoring extra arguments. As a side-effect, produce\r
66 more specific error messages for the 'config' command as a whole.\r
67 ---\r
68  notmuch-config.c |   19 +++++++++++++++----\r
69  1 files changed, 15 insertions(+), 4 deletions(-)\r
70 \r
71 diff --git a/notmuch-config.c b/notmuch-config.c\r
72 index 85fc774..f9eb977 100644\r
73 --- a/notmuch-config.c\r
74 +++ b/notmuch-config.c\r
75 @@ -804,15 +804,26 @@ notmuch_config_command (void *ctx, int argc, char *argv[])\r
76  {\r
77      argc--; argv++; /* skip subcommand argument */\r
78  \r
79 -    if (argc < 2) {\r
80 -       fprintf (stderr, "Error: notmuch config requires at least two arguments.\n");\r
81 +    if (argc < 1) {\r
82 +       fprintf (stderr, "Error: notmuch config requires at least one argument.\n");\r
83         return 1;\r
84      }\r
85  \r
86 -    if (strcmp (argv[0], "get") == 0)\r
87 +    if (strcmp (argv[0], "get") == 0) {\r
88 +       if (argc != 2) {\r
89 +           fprintf (stderr, "Error: notmuch config get requires exactly "\r
90 +                    "one argument.\n");\r
91 +           return 1;\r
92 +       }\r
93         return notmuch_config_command_get (ctx, argv[1]);\r
94 -    else if (strcmp (argv[0], "set") == 0)\r
95 +    } else if (strcmp (argv[0], "set") == 0) {\r
96 +       if (argc < 2) {\r
97 +           fprintf (stderr, "Error: notmuch config set requires at least "\r
98 +                    "one argument.\n");\r
99 +           return 1;\r
100 +       }\r
101         return notmuch_config_command_set (ctx, argv[1], argc - 2, argv + 2);\r
102 +    }\r
103  \r
104      fprintf (stderr, "Unrecognized argument for notmuch config: %s\n",\r
105              argv[0]);\r
106 -- \r
107 1.7.4.4\r
108 \r