Update prefix so that "thread:" can be used in search strings.
authorCarl Worth <cworth@cworth.org>
Wed, 28 Oct 2009 06:55:08 +0000 (23:55 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 28 Oct 2009 06:55:08 +0000 (23:55 -0700)
It's convenient to be able to do things like:

     notmuch tag -inbox thread:<thread-id>

(even though this can run into a race condition as noted in TODO--the fix
for the race is simply to not run "notmuch new" between reading a thread
with the (not yet existent) "notmuch show" and removing its inbox tag
with a command like the above). So we now allow such a thing.

database.cc

index 0fd0bdadf8103366b4c2f95924926d1f532df0ca..5555b0e317083b5ca5f68f65f5050530e6780cb4 100644 (file)
@@ -104,12 +104,12 @@ typedef struct {
 
 prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
     { "type", "T" },
-    { "thread", "G" },
     { "ref", "XREFERENCE" },
     { "timestamp", "XTIMESTAMP" },
 };
 
 prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
+    { "thread", "G" },
     { "tag", "K" },
     { "id", "Q" }
 };