git-cl: only set WIP on first upload
It seems like some folks are confused by additional patchsets
after the first putting the change back into WIP mode. This
confusion is honestly understandable. Maybe we try only setting
it on the very first upload, and just controlling the notify
parameter for future patchsets.
Bug: 721836, 737675
Change-Id: If56e5c71e0c6b3b46c2e30ac0b6d80b878218181
Reviewed-on: https://chromium-review.googlesource.com/552779
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: smut <smut@google.com>
Commit-Queue: Aaron Gable <agable@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 5b945b9..5d0375c 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3016,10 +3016,17 @@
# https://gerrit-review.googlesource.com/Documentation/user-upload.html
refspec_opts = []
+ # By default, new changes are started in WIP mode, and subsequent patchsets
+ # don't send email. At any time, passing --send-mail will mark the change
+ # ready and send email for that particular patch.
if options.send_mail:
refspec_opts.append('ready')
+ refspec_opts.append('notify=ALL')
else:
- refspec_opts.append('wip')
+ if not self.GetIssue():
+ refspec_opts.append('wip')
+ else:
+ refspec_opts.append('notify=NONE')
# TODO(tandrii): options.message should be posted as a comment
# if --send-email is set on non-initial upload as Rietveld used to do it.