From: Peter Wang Date: Sun, 23 Jun 2013 04:23:55 +0000 (+1000) Subject: [PATCH v7 02/12] tag-util: do not reset list in parse_tag_command_line X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4a8aaa9a023f4717a1766e627c2c6213a3002fd5;p=notmuch-archives.git [PATCH v7 02/12] tag-util: do not reset list in parse_tag_command_line --- diff --git a/9e/acc2c6b9ac58664c8786b411f5096e496a6d8d b/9e/acc2c6b9ac58664c8786b411f5096e496a6d8d new file mode 100644 index 000000000..f66a9897a --- /dev/null +++ b/9e/acc2c6b9ac58664c8786b411f5096e496a6d8d @@ -0,0 +1,102 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 6E807429E26 + for ; Sat, 22 Jun 2013 21:24:20 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id UFydAVinQFky for ; + Sat, 22 Jun 2013 21:24:14 -0700 (PDT) +Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com + [209.85.220.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 0F21C431FD4 + for ; Sat, 22 Jun 2013 21:24:05 -0700 (PDT) +Received: by mail-pa0-f42.google.com with SMTP id rl6so9555387pac.29 + for ; Sat, 22 Jun 2013 21:24:05 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; + bh=fPbJUWFiSrZWupnXHqBxKPQz/HP1Yw/teHwqY2oUqs0=; + b=xhtrdhvolhxG/792yX0FRU9Sx/SxpblyId0Jdms0Lp3s+vCeELAfCKQquIGLK0CInk + Eg98x1O4I5BHJAXmkM9A/jlj27rE3kOGF4EAjKbMumsYJBi71iyG8lYEQtBGt0QMQ5Kq + IVtALFWTtstrZH+qwtoOLOLkw8Peeg/nDX+E+hken2IlcaLpfK9Ix4Wcuiv0WVmiQ1pi + f3V1PE8MnIihXJu/4kO5mD2T3zhgA694bQKp+1b5aguAIn7v3gYJJHjvWgIpYu/MSznU + KrP1vjM1sfnOV5BnvWNssbcrGutXuzmQYMO2UhtIoswzL8UR5qv8I/Pqi+YgRHmg4sse + uSiw== +X-Received: by 10.68.219.130 with SMTP id po2mr18802382pbc.68.1371961445332; + Sat, 22 Jun 2013 21:24:05 -0700 (PDT) +Received: from localhost (215.42.233.220.static.exetel.com.au. + [220.233.42.215]) + by mx.google.com with ESMTPSA id ep2sm5603965pbb.27.2013.06.22.21.24.03 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 22 Jun 2013 21:24:04 -0700 (PDT) +From: Peter Wang +To: notmuch@notmuchmail.org +Subject: [PATCH v7 02/12] tag-util: do not reset list in + parse_tag_command_line +Date: Sun, 23 Jun 2013 14:23:55 +1000 +Message-Id: <1371961445-15182-3-git-send-email-novalazy@gmail.com> +X-Mailer: git-send-email 1.7.12.1 +In-Reply-To: <1371961445-15182-1-git-send-email-novalazy@gmail.com> +References: <1371961445-15182-1-git-send-email-novalazy@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 23 Jun 2013 04:24:20 -0000 + +The 'insert' command will be better served if parse_tag_command_line +modifies a pre-populated list (of new.tags) instead of clobbering the +list outright. The sole existing caller, notmuch_tag_command, is +unaffected by this change. +--- + tag-util.c | 2 -- + tag-util.h | 2 ++ + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tag-util.c b/tag-util.c +index 92e08a1..3bde409 100644 +--- a/tag-util.c ++++ b/tag-util.c +@@ -165,8 +165,6 @@ parse_tag_command_line (void *ctx, int argc, char **argv, + + int i; + +- tag_op_list_reset (tag_ops); +- + for (i = 0; i < argc; i++) { + if (strcmp (argv[i], "--") == 0) { + i++; +diff --git a/tag-util.h b/tag-util.h +index 246de85..4628f16 100644 +--- a/tag-util.h ++++ b/tag-util.h +@@ -81,6 +81,8 @@ parse_tag_line (void *ctx, char *line, + * Output Parameters: + * ops contains a list of tag operations + * query_str the search terms. ++ * ++ * The ops argument is not cleared. + */ + + tag_parse_status_t +-- +1.7.12.1 +