diff --git a/git_cl.py b/git_cl.py index 213ff9180..5b945b90e 100755 --- a/git_cl.py +++ b/git_cl.py @@ -3016,7 +3016,9 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): # https://gerrit-review.googlesource.com/Documentation/user-upload.html refspec_opts = [] - if not options.send_mail: + if options.send_mail: + refspec_opts.append('ready') + else: refspec_opts.append('wip') # TODO(tandrii): options.message should be posted as a comment diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index d7938db72..b1c5f7c6f 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -1519,15 +1519,12 @@ class TestGitCl(TestCase): '1hashPerLine\n'), ] - ref_suffix = '' - if not notify: - ref_suffix = '%wip' + ref_suffix = '%wip' + if notify: + ref_suffix = '%ready' if title: - if ref_suffix: - ref_suffix += ',m=' + title - else: - ref_suffix = '%m=' + title + ref_suffix += ',m=' + title if git_mirror is None: calls += [