[PATCH 2/7] cli: only check the ignore list if needed

Jani Nikula jani at nikula.org
Sun Jan 19 12:32:23 PST 2014


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



More information about the notmuch mailing list