[PATCH 1/2] cli: Allow combining --remove-all and --batch
authorDaniel Schoepe <daniel@schoepe.org>
Tue, 11 Aug 2015 07:46:37 +0000 (09:46 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:19 +0000 (14:49 -0700)
b9/c8d5665075ceac43f8abfa51f048d650fac3c0 [new file with mode: 0644]

diff --git a/b9/c8d5665075ceac43f8abfa51f048d650fac3c0 b/b9/c8d5665075ceac43f8abfa51f048d650fac3c0
new file mode 100644 (file)
index 0000000..75a2e5a
--- /dev/null
@@ -0,0 +1,97 @@
+Return-Path: <daniel@schoepe.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 arlo.cworth.org (Postfix) with ESMTP id D47BD6DE1532\r
+ for <notmuch@notmuchmail.org>; Tue, 11 Aug 2015 00:47:18 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.11\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.11 tagged_above=-999 required=5 tests=[AWL=0.097, \r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
+ RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_WEB=0.614, SPF_PASS=-0.001]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id ZLRaRCWwV2x6 for <notmuch@notmuchmail.org>;\r
+ Tue, 11 Aug 2015 00:47:17 -0700 (PDT)\r
+Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com\r
+ [209.85.212.171])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id E53906DE099D\r
+ for <notmuch@notmuchmail.org>; Tue, 11 Aug 2015 00:47:16 -0700 (PDT)\r
+Received: by wicja10 with SMTP id ja10so57046861wic.1\r
+ for <notmuch@notmuchmail.org>; Tue, 11 Aug 2015 00:47:15 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google;\r
+ h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+ bh=5hFWSeWKuVV4UReuueFD0cc1VUuDYQL/TTIaJR/NfDw=;\r
+ b=Iw/aeTE2VuNzF3kuuBFK/v5F/+cNaYiuqiZ3eDhvXjUZ3I8Xxiq869N7JyOY0Acq/+\r
+ NcevUsORGexLEkPQ4JpPDp5+hxM6/MwO/N8Xlpx5jPy56OVE/oFsQL9YyP7d44LHElmm\r
+ GcGtcxG0ObBBjaXFtyEygyFtr6RWDDD7K8czs=\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+ :references;\r
+ bh=5hFWSeWKuVV4UReuueFD0cc1VUuDYQL/TTIaJR/NfDw=;\r
+ b=WICAWgxpYlyIzgCf0XfkbhH/j1YBxiiqH7/W5+LWbIP1CMgRxwWKyXGsN2iqwgx4P3\r
+ 5ub9/hEzjlyWsELduptda7A0VDJySVlLs503YNj9TfhKH9JI57hDzd8JwVPdtfrTQ9gR\r
+ qXqY+BlE8kUMQHwmrlnRCSkLvLFkWFNp2BtaKG+Du6HX3slq+0WYeIw93W3/nWrf1wHl\r
+ 8yKrJFsF2JXvIbdcLFAeaZqs3ODQYwXXi5ggVcjYJGynBuyNQinbdjdDtpZR2IvToTCr\r
+ IAgRQLfwrGnkygHM3RIhSlyznx7NoCqZBSE6Nbf7bJ0P0gSv60p99Q4QgG43dx4hur6e\r
+ 1DxA==\r
+X-Gm-Message-State:\r
+ ALoCoQmXGdd/9BjxBvlaqfDoCT75n7eiG4Zw2A5Kng5KHIiTcZC59VuSXpUpuIM81Dik2B6eWujI\r
+X-Received: by 10.180.76.232 with SMTP id n8mr34396821wiw.72.1439279234951;\r
+ Tue, 11 Aug 2015 00:47:14 -0700 (PDT)\r
+Received: from localhost (ip-80-226-24-7.vodafone-net.de. [80.226.24.7])\r
+ by smtp.gmail.com with ESMTPSA id d17sm1667889wjs.32.2015.08.11.00.47.13\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Tue, 11 Aug 2015 00:47:13 -0700 (PDT)\r
+From: Daniel Schoepe <daniel@schoepe.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] cli: Allow combining --remove-all and --batch\r
+Date: Tue, 11 Aug 2015 09:46:37 +0200\r
+Message-Id: <1439279198-21330-2-git-send-email-daniel@schoepe.org>\r
+X-Mailer: git-send-email 2.5.0\r
+In-Reply-To: <1439279198-21330-1-git-send-email-daniel@schoepe.org>\r
+References: <1439279198-21330-1-git-send-email-daniel@schoepe.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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: Tue, 11 Aug 2015 07:47:18 -0000\r
+\r
+This patch removes the restriction on notmuch-tag that disallows using\r
+both --remove-all and --batch. Combining the two options removes tags\r
+on all messages affected by each query before applying the new tags.\r
+---\r
+ notmuch-tag.c | 4 ----\r
+ 1 file changed, 4 deletions(-)\r
+\r
+diff --git a/notmuch-tag.c b/notmuch-tag.c\r
+index 38d99aa..f1df986 100644\r
+--- a/notmuch-tag.c\r
++++ b/notmuch-tag.c\r
+@@ -231,10 +231,6 @@ notmuch_tag_command (notmuch_config_t *config, int argc, char *argv[])\r
+           fprintf (stderr, "Can't specify both cmdline and stdin!\n");\r
+           return EXIT_FAILURE;\r
+       }\r
+-      if (remove_all) {\r
+-          fprintf (stderr, "Can't specify both --remove-all and --batch\n");\r
+-          return EXIT_FAILURE;\r
+-      }\r
+     } else {\r
+       tag_ops = tag_op_list_create (config);\r
+       if (tag_ops == NULL) {\r
+-- \r
+2.5.0\r
+\r