CLI: print extra headers only for non-replies

If in the future we decide to output extra headers for replies, this
should be controlled by a separate configuration option.
This commit is contained in:
David Bremner 2022-01-18 21:26:45 -04:00
parent 2d036dbc3b
commit 87d5a5a8aa
2 changed files with 2 additions and 2 deletions

View file

@ -294,7 +294,8 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message,
} }
/* Output extra headers the user has configured, if any */ /* Output extra headers the user has configured, if any */
format_extra_headers_sprinter (sp, message); if (! reply)
format_extra_headers_sprinter (sp, message);
sp->end (sp); sp->end (sp);
talloc_free (local); talloc_free (local);
} }

View file

@ -486,7 +486,6 @@ EOF
test_expect_equal_file EXPECTED OUTPUT test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply with show.extra_headers set" test_begin_subtest "Reply with show.extra_headers set"
test_subtest_known_broken
notmuch config set show.extra_headers Received notmuch config set show.extra_headers Received
add_message '[from]="Sender <sender@example.com>"' \ add_message '[from]="Sender <sender@example.com>"' \
[to]=test_suite_other@notmuchmail.org [to]=test_suite_other@notmuchmail.org