[PATCH] CLI: print extra headers only for non-replies

Subject: [PATCH] CLI: print extra headers only for non-replies

Date: Tue, 18 Jan 2022 21:34:00 -0400

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: David Bremner


If in the future we decide to output extra headers for replies, this
should be controlled by a separate configuration option.
---
 notmuch-show.c     | 3 ++-
 test/T310-emacs.sh | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/notmuch-show.c b/notmuch-show.c
index 136f4439..6a54d9c1 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -294,7 +294,8 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message,
     }
 
     /* 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);
     talloc_free (local);
 }
diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
index 831df1cc..a05b828a 100755
--- a/test/T310-emacs.sh
+++ b/test/T310-emacs.sh
@@ -486,7 +486,6 @@ EOF
 test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "Reply with show.extra_headers set"
-test_subtest_known_broken
 notmuch config set show.extra_headers Received
 add_message '[from]="Sender <sender@example.com>"' \
 	     [to]=test_suite_other@notmuchmail.org
-- 
2.34.1

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: