[PATCH 3/6] cli: add '--debug' option to 'notmuch new'
authorPieter Praet <pieter@praet.org>
Sun, 19 Feb 2012 20:47:53 +0000 (21:47 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:42 +0000 (09:44 -0800)
cb/c41fe18e5574eed308d2174a9bd344613b3246 [new file with mode: 0644]

diff --git a/cb/c41fe18e5574eed308d2174a9bd344613b3246 b/cb/c41fe18e5574eed308d2174a9bd344613b3246
new file mode 100644 (file)
index 0000000..4bbb176
--- /dev/null
@@ -0,0 +1,105 @@
+Return-Path: <pieter@praet.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 3DDFE431FAF\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:50:31 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id hNpfyowkLytJ for <notmuch@notmuchmail.org>;\r
+       Sun, 19 Feb 2012 12:50:30 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+       [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id CA00B431FC9\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:50:26 -0800 (PST)\r
+Received: by wibhi8 with SMTP id hi8so3110550wib.26\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:50:25 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
+       10.180.78.6 as permitted sender) client-ip=10.180.78.6; \r
+Authentication-Results: mr.google.com;\r
+       spf=pass (google.com: domain of pieter@praet.org\r
+       designates 10.180.78.6 as permitted sender)\r
+       smtp.mail=pieter@praet.org\r
+Received: from mr.google.com ([10.180.78.6])\r
+       by 10.180.78.6 with SMTP id x6mr13019112wiw.18.1329684625631 (num_hops\r
+       = 1); Sun, 19 Feb 2012 12:50:25 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.180.78.6 with SMTP id x6mr10905637wiw.18.1329684625571;\r
+       Sun, 19 Feb 2012 12:50:25 -0800 (PST)\r
+Received: from localhost (104.218-242-81.adsl-dyn.isp.belgacom.be.\r
+       [81.242.218.104])\r
+       by mx.google.com with ESMTPS id by3sm11445932wib.3.2012.02.19.12.50.24\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 19 Feb 2012 12:50:25 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: David Bremner <david@tethera.net>,\r
+       Tomi Ollila <tomi.ollila@iki.fi>\r
+Subject: [PATCH 3/6] cli: add '--debug' option to 'notmuch new'\r
+Date: Sun, 19 Feb 2012 21:47:53 +0100\r
+Message-Id: <1329684476-9596-4-git-send-email-pieter@praet.org>\r
+X-Mailer: git-send-email 1.7.8.1\r
+In-Reply-To: <1329684476-9596-1-git-send-email-pieter@praet.org>\r
+References: <8739a93beq.fsf@zancas.localnet>\r
+       <1329684476-9596-1-git-send-email-pieter@praet.org>\r
+X-Gm-Message-State:\r
+ ALoCoQn6tIBonvqKcHsnVWzVq5yao468MV/va7Raplm8ODM66g/JOxp6s3owzkIs4Uk69SxBt/oC\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 19 Feb 2012 20:50:31 -0000\r
+\r
+This will be used in later patches to test the 'new.ignore'\r
+config option more thoroughly.\r
+---\r
+ notmuch-new.c |    4 ++++\r
+ 1 files changed, 4 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/notmuch-new.c b/notmuch-new.c\r
+index 4f13535..ca12003 100644\r
+--- a/notmuch-new.c\r
++++ b/notmuch-new.c\r
+@@ -37,6 +37,7 @@ typedef struct _filename_list {\r
+ typedef struct {\r
+     int output_is_a_tty;\r
+     int verbose;\r
++    int debug;\r
+     const char **new_tags;\r
+     size_t new_tags_length;\r
+     const char **new_ignore;\r
+@@ -842,6 +843,7 @@ notmuch_new_command (void *ctx, int argc, char *argv[])\r
+     notmuch_bool_t run_hooks = TRUE;\r
+ \r
+     add_files_state.verbose = 0;\r
++    add_files_state.debug = 0;\r
+     add_files_state.output_is_a_tty = isatty (fileno (stdout));\r
+ \r
+     argc--; argv++; /* skip subcommand argument */\r
+@@ -849,6 +851,8 @@ notmuch_new_command (void *ctx, int argc, char *argv[])\r
+     for (i = 0; i < argc && argv[i][0] == '-'; i++) {\r
+       if (STRNCMP_LITERAL (argv[i], "--verbose") == 0) {\r
+           add_files_state.verbose = 1;\r
++      } else if (strcmp (argv[i], "--debug") == 0) {\r
++          add_files_state.debug = 1;\r
+       } else if (strcmp (argv[i], "--no-hooks") == 0) {\r
+           run_hooks = FALSE;\r
+       } else {\r
+-- \r
+1.7.8.1\r
+\r