[PATCH b4] send: honor excluded addresses in per-patch Cc summary

Weijie Yuan <[email protected]>
Newsgroups org.kernel.linux.tools
Message-ID <20260815073254.S5ffVZo-GJdw79bgmrkrIxa4hk3P3JqnJsZwwSh-83E@z>
When --not-me-too or b4.send-me-too=no is used, the sender's address is
added to the exclusion list and removed from the final To/Cc headers.
However, the pre-send summary prints per-patch Cc candidates without
applying the same exclusion.

This can result in output such as:

  [PATCH ...] ...
    +Cc: User <[email protected]>

even though the generated message does not actually Cc that address.

Filter the per-patch Cc summary through cleanup_email_addrs() with the
same exclusion set used by the actual send path, so that the displayed
recipients match the recipients that will be used.

Signed-off-by: Weijie Yuan <[email protected]>
---
 src/b4/ez.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/b4/ez.py b/src/b4/ez.py
index 79a630471f32..020d06def8cf 100644
--- a/src/b4/ez.py
+++ b/src/b4/ez.py
@@ -3046,7 +3046,9 @@ def cmd_send(cmdargs: argparse.Namespace) -> None:
                     if pair[1] not in seen:
                         extracc.append(pair)
                 if extracc:
-                    b4.print_pretty_addrs(extracc, '    +Cc')
+                    extracc = b4.cleanup_email_addrs(extracc, excludes, None)
+                    if extracc:
+                        b4.print_pretty_addrs(extracc, '    +Cc')
 
         logger.info('---')
         usercfg = b4.get_user_config()
-- 
2.55.0.717.g61afef3e370b
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.