mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
lib: enforce that n_message_reindex takes headers from first file
This is still a bit stopgap to be only choosing one set of headers, but this seems like a more defensible set of headers to choose.
This commit is contained in:
parent
36a3d65034
commit
debfae20db
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 <<EOF > EXPECTED
|
||||
thread:XXX 2001-01-05 [1/1(3)] Notmuch Test Suite; message 0 (inbox unread)
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue