notmuch.git  about / heads / tags
Unnamed repository; edit this file 'description' to name the repository.
   commit 891af1d457a174e12943baf111175af14bb4bb53 (patch)
   parent a5f7efd7 doc: mark `--output=summary` as default
     tree d704c5c7fefb1288e3435ed337c4f3352d0c3585
   author David Bremner <david@tethera.net>  2022-10-16 09:49:00 -0300
committer David Bremner <david@tethera.net>  2022-12-27 11:54:57 -0400

CLI/git: use --exclude=false when calling notmuch-search

We use notmuch search in two places in notmuch-git.py: to find which
tags have a given prefix, and to see if message with given id exists
locally. In both cases we do not want the presence of exclude tags
(e.g. deleted) to change the results.
---
 notmuch-git.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/notmuch-git.py b/notmuch-git.py
index ceb86fbc..57098aae 100644
--- a/notmuch-git.py
+++ b/notmuch-git.py
@@ -254,7 +254,7 @@ def count_messages(prefix=None):
 def get_tags(prefix=None):
     "Get a list of tags with a given prefix."
     (status, stdout, stderr) = _spawn(
-        args=['notmuch', 'search', '--query=sexp', '--output=tags', _tag_query(prefix)],
+        args=['notmuch', 'search', '--exclude=false', '--query=sexp', '--output=tags', _tag_query(prefix)],
         stdout=_subprocess.PIPE, wait=True)
     return [tag for tag in stdout.splitlines()]
 
@@ -719,7 +719,7 @@ class DatabaseCache:
                 self._known[id] = False
         else:
             (_, stdout, stderr) = _spawn(
-                args=['notmuch', 'search', '--output=files', 'id:{0}'.format(id)],
+                args=['notmuch', 'search', '--exclude=false', '--output=files', 'id:{0}'.format(id)],
                 stdout=_subprocess.PIPE,
                 wait=True)
             self._known[id] = stdout != None


glossary
--------
Commit objects reference one tree, and zero or more parents.

Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.

Multiple parents means the commit is a merge.

Root commits have no ancestor.  Note that it is
possible to have multiple root commits when merging independent histories.

Every commit references one top-level tree object.

git clone https://yhetil.org/notmuch.git