Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index eaaed167aff5f4121c58a9aaf0814339ac337371..c6df2b26dbe1448b990bc429490a3255c863620a 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -2468,6 +2468,13 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): |
print('WARNING: underscores in title will be converted to spaces.') |
refspec_opts.append('m=' + options.title.replace(' ', '_')) |
+ if options.send_mail: |
+ if not change_desc.get_reviewers(): |
+ DieWithError('Must specify reviewers to send email.') |
+ refspec_opts.append('notify=ALL') |
+ else: |
+ refspec_opts.append('notify=NONE') |
+ |
cc = self.GetCCList().split(',') |
if options.cc: |
cc.extend(options.cc) |
@@ -2482,7 +2489,6 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): |
refspec_opts.extend('r=' + email.strip() |
for email in change_desc.get_reviewers()) |
- |
refspec_suffix = '' |
if refspec_opts: |
refspec_suffix = '%' + ','.join(refspec_opts) |