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 <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 3f1752f..390f4b4 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3018,7 +3018,10 @@
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])