From d105249ddaa338aa8b4d090646c05102f9169f3b Mon Sep 17 00:00:00 2001 From: Aaron Gable Date: Mon, 15 May 2017 15:05:34 -0700 Subject: [PATCH] Don't add WATCHLIST CCs on private CLs Many WATCHLIST and codereview.settings files contain large public email lists, which defeats the purpose of private reviews. R=tandrii@chromium.org Bug: 721880 Change-Id: Ibb3f314f735b783e628f8cc1fc22c74e0df59f1c Reviewed-on: https://chromium-review.googlesource.com/506489 Reviewed-by: Andrii Shyshkalov Commit-Queue: Aaron Gable --- git_cl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index 3f1752f01..390f4b4f1 100755 --- a/git_cl.py +++ b/git_cl.py @@ -3018,7 +3018,10 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): reviewers = sorted(change_desc.get_reviewers()) # Add cc's from the CC_LIST and --cc flag (if any). - cc = self.GetCCList().split(',') + if not options.private: + cc = self.GetCCList().split(',') + else: + cc = [] if options.cc: cc.extend(options.cc) cc = filter(None, [email.strip() for email in cc])