From 7e752d8ef401f6028d637a864fc75a16e4b58d36 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Tue, 3 Jan 2023 17:37:21 -0500 Subject: ez: dedupe cover letter CCs taken from individual patches Make sure we don't duplicate addresses already added to CCs from previous individual patches. Reported-by: Nathan Chancellor Link: https://msgid.link/Y6zeRaKlqNhh72OD@dev-arch.thelio-3990X Signed-off-by: Konstantin Ryabitsev --- b4/ez.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/b4/ez.py b/b4/ez.py index 327ab0c..749c511 100644 --- a/b4/ez.py +++ b/b4/ez.py @@ -1474,10 +1474,12 @@ def cmd_send(cmdargs: argparse.Namespace) -> None: mycc.append(pair) elif not commit and len(pccs): # the cover letter gets sent to folks with individual patch cc's + _seen = set(seen) for _commit, _ccs in pccs.items(): for pair in _ccs: - if pair[1] not in seen: + if pair[1] not in _seen: mycc.append(pair) + _seen.add(pair[1]) if mycc and not myto: # Move all Cc's into To when there's no To: myto = mycc -- cgit 1.2.3-korg