unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v3 0/9] Add ghost messages and fix thread linking
@ 2014-10-23 12:30 Austin Clements
  2014-10-23 12:30 ` [PATCH v3 1/9] lib: Add a ghost messages database feature Austin Clements
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Austin Clements @ 2014-10-23 12:30 UTC (permalink / raw)
  To: notmuch

This is v3 of
id:1412637438-4821-1-git-send-email-aclements@csail.mit.edu.
This fixes some comments, as suggested by Mark.  There are no
code changes relative to v2.  The diff from v2 is below.

diff --git a/lib/database.cc b/lib/database.cc
index 6e51a72..3601f9d 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -2121,10 +2121,13 @@ _consume_metadata_thread_id (void *ctx, notmuch_database_t *notmuch,
 /* Given a blank or ghost 'message' and its corresponding
  * 'message_file' link it to existing threads in the database.
  *
- * The first check is in the metadata of the database to see if we
- * have pre-allocated a thread_id in advance for this message, (which
- * would have happened if a message was previously added that
- * referenced this one).
+ * First, if is_ghost, this retrieves the thread ID already stored in
+ * the message (which will be the case if a message was previously
+ * added that referenced this one).  If the message is blank
+ * (!is_ghost), it doesn't have a thread ID yet (we'll generate one
+ * later in this function).  If the database does not support ghost
+ * messages, this checks for a thread ID stored in database metadata
+ * for this message ID.
  *
  * Second, we look at 'message_file' and its link-relevant headers
  * (References and In-Reply-To) for message IDs.
@@ -2132,12 +2135,12 @@ _consume_metadata_thread_id (void *ctx, notmuch_database_t *notmuch,
  * Finally, we look in the database for existing message that
  * reference 'message'.
  *
- * In all cases, we assign to the current message the first thread_id
- * found (through either parent or child). We will also merge any
- * existing, distinct threads where this message belongs to both,
- * (which is not uncommon when messages are processed out of order).
+ * In all cases, we assign to the current message the first thread ID
+ * found. We will also merge any existing, distinct threads where this
+ * message belongs to both, (which is not uncommon when messages are
+ * processed out of order).
  *
- * Finally, if no thread ID has been found through parent or child, we
+ * Finally, if no thread ID has been found through referenced messages, we
  * call _notmuch_message_generate_thread_id to generate a new thread
  * ID. This should only happen for new, top-level messages, (no
  * References or In-Reply-To header in this message, and no previously

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-10-25 18:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 12:30 [PATCH v3 0/9] Add ghost messages and fix thread linking Austin Clements
2014-10-23 12:30 ` [PATCH v3 1/9] lib: Add a ghost messages database feature Austin Clements
2014-10-23 12:30 ` [PATCH v3 2/9] lib: Update database schema doc for ghost messages Austin Clements
2014-10-23 12:30 ` [PATCH v3 3/9] lib: Introduce macros for bit operations Austin Clements
2014-10-24  4:40   ` Jani Nikula
2014-10-24 12:49     ` [PATCH v3.1 " Austin Clements
2014-10-23 12:30 ` [PATCH v3 4/9] lib: Internal support for querying and creating ghost messages Austin Clements
2014-10-23 12:30 ` [PATCH v3 5/9] lib: Implement ghost-based thread linking Austin Clements
2014-10-23 12:30 ` [PATCH v3 6/9] lib: Implement upgrade to ghost messages feature Austin Clements
2014-10-23 12:30 ` [PATCH v3 7/9] lib: Enable " Austin Clements
2014-10-23 12:30 ` [PATCH v3 8/9] test: Test upgrade to " Austin Clements
2014-10-23 12:30 ` [PATCH v3 9/9] lib: Remove unnecessary thread linking steps when using ghost messages Austin Clements
2014-10-25 18:02 ` [PATCH v3 0/9] Add ghost messages and fix thread linking 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).