Chromium Code Reviews| Index: git_cl.py |
| diff --git a/git_cl.py b/git_cl.py |
| index c03d6103d734c847562babc819440241a82e73c5..aa448e6480f344fcf1e575388def76387f66ac5b 100755 |
| --- a/git_cl.py |
| +++ b/git_cl.py |
| @@ -2517,10 +2517,14 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): |
| # https://gerrit-review.googlesource.com/Documentation/user-upload.html |
| refspec_opts = [] |
| if options.title: |
| + if not re.match(r'^[\w ]+$', options.title): |
| + options.title = re.sub(r'[^\w ]', '', options.title) |
| + print('WARNING: Patchset title may only contain alphanumeric chars ' |
| + 'and space. Cleaned up title:\n%s' % options.title) |
|
Bons
2016/08/17 16:48:18
and spaces.
|
| + if not options.force: |
| + ask_for_data('Press enter to continue, Ctrl+C to abort') |
| # Per doc, spaces must be converted to underscores, and Gerrit will do the |
| # reverse on its side. |
| - if '_' in options.title: |
| - print('WARNING: underscores in title will be converted to spaces.') |
| refspec_opts.append('m=' + options.title.replace(' ', '_')) |
| if options.send_mail: |