| Index: git_cl.py
|
| diff --git a/git_cl.py b/git_cl.py
|
| index c03d6103d734c847562babc819440241a82e73c5..6658a2fa05aaf149ac417453e4643cf1e6a9b1f4 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 spaces. Cleaned up title:\n%s' % options.title)
|
| + 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:
|
|
|