From b51d147a2bf11cfc3e509462833e4fd66764b0fb Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Thu, 24 Jan 2013 23:07:58 +1100 Subject: [PATCH] [PATCH v4 02/12] tag-util: do not reset list in parse_tag_command_line --- b1/efe5260f491465ea69fb22c940ea1a60b884ca | 101 ++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 b1/efe5260f491465ea69fb22c940ea1a60b884ca diff --git a/b1/efe5260f491465ea69fb22c940ea1a60b884ca b/b1/efe5260f491465ea69fb22c940ea1a60b884ca new file mode 100644 index 000000000..285e011d0 --- /dev/null +++ b/b1/efe5260f491465ea69fb22c940ea1a60b884ca @@ -0,0 +1,101 @@ +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 25EC5431FC3 + for ; Thu, 24 Jan 2013 04:09:27 -0800 (PST) +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 vTORbu9jXZ1X for ; + Thu, 24 Jan 2013 04:09:26 -0800 (PST) +Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com + [209.85.160.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 3B78B431FD2 + for ; Thu, 24 Jan 2013 04:09:25 -0800 (PST) +Received: by mail-pb0-f44.google.com with SMTP id uo1so5374035pbc.31 + for ; Thu, 24 Jan 2013 04:09:24 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to + :references; bh=tBepm0XxkPcJupQVQTPdClVDY+76BaoMPvlO0Y6wxeQ=; + b=N3JOfMnl1B/R/ro7lWeCxyc6Cr1T/tJBkTT/zRED2TZKKZ46UsBA3HdFxvn4NP/1Jl + +wk3dANAOcygKCtrysenTQNIVaoMsze5N98zfq4V42qZS8qIuHo3HsvFYGJTQtjyf045 + GX0gOykh5NBVjY2zgduZdjkqHY4Yugr6d3ofggrvvVAUrLU3C8HTbxVyAAw8yitGFe8R + 2AC7E9mUZearYwTmVUnvuSvd8SBY1s0fLEJUhDvAXebzTf53JUINt0vbqpK5VTVgzIqq + gOBPXKLgmiZKcR0V1F2cfNW9uj2k+dre22Bol8MHZyAiuy//+pyA9yXzB31rBhSzDBRi + FLWw== +X-Received: by 10.68.222.196 with SMTP id qo4mr4083338pbc.140.1359029364420; + Thu, 24 Jan 2013 04:09:24 -0800 (PST) +Received: from localhost (215.42.233.220.static.exetel.com.au. + [220.233.42.215]) + by mx.google.com with ESMTPS id wh8sm14770881pbc.75.2013.01.24.04.09.22 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Thu, 24 Jan 2013 04:09:23 -0800 (PST) +From: Peter Wang +To: notmuch@notmuchmail.org +Subject: [PATCH v4 02/12] tag-util: do not reset list in + parse_tag_command_line +Date: Thu, 24 Jan 2013 23:07:58 +1100 +Message-Id: <1359029288-12132-3-git-send-email-novalazy@gmail.com> +X-Mailer: git-send-email 1.7.12.1 +In-Reply-To: <1359029288-12132-1-git-send-email-novalazy@gmail.com> +References: <1359029288-12132-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: Thu, 24 Jan 2013 12:09:27 -0000 + +No current callers of parse_tag_command_line require that it clear its +tag list argument. The notmuch 'insert' command will be better served +if the function modifies a pre-populated list (of new.tags) instead of +clobbering it outright. +--- + 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 743d591..b57ee32 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 + -- 2.26.2