From: Jani Nikula Date: Sun, 19 Jan 2014 20:32:23 +0000 (+0200) Subject: [PATCH 2/7] cli: only check the ignore list if needed X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=97cfa7c743add8451de43f83c7826be5a8f380ea;p=notmuch-archives.git [PATCH 2/7] cli: only check the ignore list if needed --- diff --git a/bd/5c713697dd51049a063855464fb5aed8ec664c b/bd/5c713697dd51049a063855464fb5aed8ec664c new file mode 100644 index 000000000..04db342a5 --- /dev/null +++ b/bd/5c713697dd51049a063855464fb5aed8ec664c @@ -0,0 +1,92 @@ +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 9F045431FC4 + for ; Sun, 19 Jan 2014 12:32:52 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 c1dXMymk8KdL for ; + Sun, 19 Jan 2014 12:32:47 -0800 (PST) +Received: from mail-ea0-f174.google.com (mail-ea0-f174.google.com + [209.85.215.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 7EAC6431FC2 + for ; Sun, 19 Jan 2014 12:32:44 -0800 (PST) +Received: by mail-ea0-f174.google.com with SMTP id b10so2716890eae.33 + for ; Sun, 19 Jan 2014 12:32:42 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to + :references:in-reply-to:references; + bh=JdCwtWb9BtRHR0JMifCjyJMlDcP0IRZm4q8ezUjIeic=; + b=bWAOQQF7FbQkh/oFq5P2sRXMWHL/mc+bAW/BaZbY9H73xKyWgN2H9XnUSc2I+gMIpL + ygfAE4jGR2LgmzSuW0RyQXGN/unlsBsu7CSUjmzhLwKf3YySTLUTF7HxKgypLW9tG33q + acgJyZZFjpew7Lpl8c4n+QbVUKHGIykTlxmEqP3eMqBp4WT1W+wN9Ns3fGaFg5FI7YJ8 + W37zspM8hpZEhex0xDBkydI986UnbvjevSbkplgzUHBA4/OyA7qCSCVT6FuhutLm13Cp + YXQBKTHLIo2+0JnXiS3Oc4lwOrLwqvKTyp0j5St8lO3XKua40bjK/mHsZvhxzNkPTXOn + Tf2Q== +X-Gm-Message-State: + ALoCoQlsQoYa/CEus3T8vq+c07c7zvpS9M9khArrAf8leNktwyj+kmlhwrBtARWPlRNED8iB5vw6 +X-Received: by 10.15.109.196 with SMTP id cf44mr14038166eeb.12.1390163562043; + Sun, 19 Jan 2014 12:32:42 -0800 (PST) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id x2sm43846026eeo.8.2014.01.19.12.32.40 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 19 Jan 2014 12:32:41 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH 2/7] cli: only check the ignore list if needed +Date: Sun, 19 Jan 2014 22:32:23 +0200 +Message-Id: + <6fedb8aeeffb6c78aeb4a837267ad3c0d2dddee9.1390163335.git.jani@nikula.org> +X-Mailer: git-send-email 1.8.5.2 +In-Reply-To: +References: +In-Reply-To: +References: +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, 19 Jan 2014 20:32:52 -0000 + +Premature optimization is the root of all evil, but this is simple +enough. +--- + notmuch-new.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/notmuch-new.c b/notmuch-new.c +index 1dd8fc9..7f3b3b0 100644 +--- a/notmuch-new.c ++++ b/notmuch-new.c +@@ -728,7 +728,7 @@ count_files (const char *path, int *count, add_files_state_t *state) + strcmp (entry->d_name, ".notmuch") == 0 || + _entry_in_ignore_list (entry->d_name, state)) + { +- if (_entry_in_ignore_list (entry->d_name, state) && state->debug) ++ if (state->debug && _entry_in_ignore_list (entry->d_name, state)) + printf ("(D) count_files: explicitly ignoring %s/%s\n", + path, + entry->d_name); +-- +1.8.5.2 +