Commit ca166003 authored by nodir's avatar nodir Committed by Commit bot

upload.py: honor explicit empty title

R=pauljensen@chromium.org
BUG=
TEST=PatchSet 3 of this CL

Review-Url: https://codereview.chromium.org/2096123003
parent aa0b3b6b
......@@ -1898,7 +1898,7 @@ class _RietveldChangelistImpl(_ChangelistCodereviewBase):
upload_args.extend(['--email', options.email])
if self.GetIssue():
if options.title:
if options.title is not None:
upload_args.extend(['--title', options.title])
if options.message:
upload_args.extend(['--message', options.message])
......@@ -1906,7 +1906,7 @@ class _RietveldChangelistImpl(_ChangelistCodereviewBase):
print('This branch is associated with issue %s. '
'Adding patch to that issue.' % self.GetIssue())
else:
if options.title:
if options.title is not None:
upload_args.extend(['--title', options.title])
message = (options.title or options.message or
CreateDescriptionFromLog(args))
......
......@@ -2440,6 +2440,7 @@ def RealMain(argv, data=None):
# Process --message, --title and --file.
message = options.message or ""
explicit_title = options.title is not None
title = options.title or ""
if options.file:
if options.message:
......@@ -2448,7 +2449,7 @@ def RealMain(argv, data=None):
message = file.read()
file.close()
title = title or message.split('\n', 1)[0].strip()
if not title:
if not title and not explicit_title:
if options.issue:
prompt = "Title describing this patch set"
else:
......
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