[PATCH v6 02/12] tag-util: do not reset list in parse_tag_command_line
authorPeter Wang <novalazy@gmail.com>
Sat, 22 Jun 2013 05:46:38 +0000 (15:46 +1000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:55:36 +0000 (09:55 -0800)
de/de2855f99f770f3fe84d23f584d8bc361c4c7e [new file with mode: 0644]

diff --git a/de/de2855f99f770f3fe84d23f584d8bc361c4c7e b/de/de2855f99f770f3fe84d23f584d8bc361c4c7e
new file mode 100644 (file)
index 0000000..4721bf4
--- /dev/null
@@ -0,0 +1,102 @@
+Return-Path: <novalazy@gmail.com>\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 E1694431FC3\r
+       for <notmuch@notmuchmail.org>; Fri, 21 Jun 2013 22:47:10 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, 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 suR9YvYFREIl for <notmuch@notmuchmail.org>;\r
+       Fri, 21 Jun 2013 22:47:05 -0700 (PDT)\r
+Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com\r
+       [209.85.220.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 013BE431FAE\r
+       for <notmuch@notmuchmail.org>; Fri, 21 Jun 2013 22:47:04 -0700 (PDT)\r
+Received: by mail-pa0-f42.google.com with SMTP id rl6so8790420pac.15\r
+       for <notmuch@notmuchmail.org>; Fri, 21 Jun 2013 22:47:04 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=uGhCFmhR6GDSZO0Amme3lygoSxHmkPKNyhUcG7bsz4g=;\r
+       b=jNFyz8iFTbrBo5Vv9a4C56R3w3MgbDq+XwNLQ8lVGvkvVtk/IMjLruoUQ/xL8M7upy\r
+       fH9cHO6YoGmjiVtiiZynZZXPxHg64zUDtLdc4ZYS5Fg2/8BiwY/px0aQECwG221NC4x5\r
+       DRIDjpIoAdrLbVgapxm0ZlzWW8EeUA2PlBu47UGIBzx+2KuPw4BedOYT7NwQEVf/Ht0t\r
+       R2fBrM0VcAbHEl/3sbW+w+DKgpBmBbgNuugHvzljQ0B+nkojM3Y/uOl2NFsvPoxSFRdV\r
+       oQcaUWdfmjcZpLmXNYRx3IBCp30A17fCZCOpkG4hIwQh7YXHCTgp+knwCyaMTxXz19YE\r
+       fMPQ==\r
+X-Received: by 10.68.113.194 with SMTP id ja2mr15032747pbb.65.1371880024274;\r
+       Fri, 21 Jun 2013 22:47:04 -0700 (PDT)\r
+Received: from localhost (215.42.233.220.static.exetel.com.au.\r
+       [220.233.42.215])\r
+       by mx.google.com with ESMTPSA id tq8sm7868783pbc.30.2013.06.21.22.47.02\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Fri, 21 Jun 2013 22:47:03 -0700 (PDT)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v6 02/12] tag-util: do not reset list in\r
+ parse_tag_command_line\r
+Date: Sat, 22 Jun 2013 15:46:38 +1000\r
+Message-Id: <1371880008-18312-3-git-send-email-novalazy@gmail.com>\r
+X-Mailer: git-send-email 1.7.12.1\r
+In-Reply-To: <1371880008-18312-1-git-send-email-novalazy@gmail.com>\r
+References: <1371880008-18312-1-git-send-email-novalazy@gmail.com>\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: Sat, 22 Jun 2013 05:47:11 -0000\r
+\r
+No current callers of parse_tag_command_line require that it clear its\r
+tag list argument.  The notmuch 'insert' command will be better served\r
+if the function modifies a pre-populated list (of new.tags) instead of\r
+clobbering it outright.\r
+---\r
+ tag-util.c | 2 --\r
+ tag-util.h | 2 ++\r
+ 2 files changed, 2 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/tag-util.c b/tag-util.c\r
+index 92e08a1..3bde409 100644\r
+--- a/tag-util.c\r
++++ b/tag-util.c\r
+@@ -165,8 +165,6 @@ parse_tag_command_line (void *ctx, int argc, char **argv,\r
\r
+     int i;\r
\r
+-    tag_op_list_reset (tag_ops);\r
+-\r
+     for (i = 0; i < argc; i++) {\r
+       if (strcmp (argv[i], "--") == 0) {\r
+           i++;\r
+diff --git a/tag-util.h b/tag-util.h\r
+index 246de85..4628f16 100644\r
+--- a/tag-util.h\r
++++ b/tag-util.h\r
+@@ -81,6 +81,8 @@ parse_tag_line (void *ctx, char *line,\r
+  * Output Parameters:\r
+  *    ops     contains a list of tag operations\r
+  *    query_str the search terms.\r
++ *\r
++ * The ops argument is not cleared.\r
+  */\r
\r
+ tag_parse_status_t\r
+-- \r
+1.7.12.1\r
+\r