Commit 276da0b4 authored by Jamie Madill's avatar Jamie Madill Committed by Commit Bot

git cl: Do not set WIP when using no_squash.

When using non-squashed uploads, there usually isn't an associated
issue with a branch. Thus setting WIP when the issue tag wasn't
present would continually set WIP even on trivial rebases. Not
adding the WIP tag when uploading allows the user to set WIP manually,
while not forcing the WIP flag after every new upload.

Also updates the unit tests that use no-squash.

Bug: 767439
Change-Id: I990a82139fefe1a0c5c7b149d39045cf985539b7
Reviewed-on: https://chromium-review.googlesource.com/1033187
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
parent 5ae86d20
......@@ -3043,7 +3043,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
if options.send_mail:
refspec_opts.append('ready')
refspec_opts.append('notify=ALL')
elif not self.GetIssue():
elif not self.GetIssue() and options.squash:
refspec_opts.append('wip')
else:
refspec_opts.append('notify=NONE')
......
......@@ -1283,7 +1283,7 @@ class TestGitCl(TestCase):
if notify:
ref_suffix = '%ready,notify=ALL'
else:
if not issue:
if not issue and squash:
ref_suffix = '%wip'
else:
ref_suffix = '%notify=NONE'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment