* [PATCH] CLI/git: use --exclude=false when calling notmuch-search
@ 2022-10-16 12:49 David Bremner
2022-12-27 15:58 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2022-10-16 12:49 UTC (permalink / raw)
To: notmuch
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(-)
The effects of this bug are a bit subtle; out of 12324 messages tagged
'deleted', without this fix I was missing 25 messages. That probably
explains why I couldn't come up with a test to demonstrate the
issue. On other hand, I think it is pretty clearly the right thing to
do, even if most people don't notice a change.
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
--
2.35.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] CLI/git: use --exclude=false when calling notmuch-search
2022-10-16 12:49 [PATCH] CLI/git: use --exclude=false when calling notmuch-search David Bremner
@ 2022-12-27 15:58 ` David Bremner
0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2022-12-27 15:58 UTC (permalink / raw)
To: notmuch
David Bremner <david@tethera.net> writes:
> 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(-)
>
> The effects of this bug are a bit subtle; out of 12324 messages tagged
> 'deleted', without this fix I was missing 25 messages. That probably
> explains why I couldn't come up with a test to demonstrate the
> issue. On other hand, I think it is pretty clearly the right thing to
> do, even if most people don't notice a change.
applied to master.
d
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-27 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-16 12:49 [PATCH] CLI/git: use --exclude=false when calling notmuch-search David Bremner
2022-12-27 15:58 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).