diff --git a/lib/message.cc b/lib/message.cc index 63d67cfe..0e3b5a4f 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -2034,7 +2034,9 @@ notmuch_message_reindex (notmuch_message_t *message, thread_id = orig_thread_id; _notmuch_message_add_term (message, "thread", thread_id); - _notmuch_message_set_header_values (message, date, from, subject); + /* Take header values only from first filename */ + if (found == 0) + _notmuch_message_set_header_values (message, date, from, subject); ret = _notmuch_message_index_file (message, message_file); diff --git a/test/T670-duplicate-mid.sh b/test/T670-duplicate-mid.sh index d4c1d1c2..ce010cf7 100755 --- a/test/T670-duplicate-mid.sh +++ b/test/T670-duplicate-mid.sh @@ -41,7 +41,6 @@ notmuch search --output=files "sekrit" | notmuch_dir_sanitize > OUTPUT test_expect_equal_file EXPECTED OUTPUT test_begin_subtest 'reindex choses subject from first filename' -test_subtest_known_broken cat < EXPECTED thread:XXX 2001-01-05 [1/1(3)] Notmuch Test Suite; message 0 (inbox unread) EOF