Use whole --message argument on patchset upload

The logic for handling --title, --message, and the
commit message of the most recent commit was accidentally
doing this differently from how Rietveld had done them.

Bug: 728391
Change-Id: I70a46ccb470d790103f5d6bb745902595be28eee
Reviewed-on: https://chromium-review.googlesource.com/527339
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
changes/39/527339/3
Aaron Gable 8 years ago committed by Commit Bot
parent fd238086f1
commit 7303dcb9b3

@ -2871,10 +2871,9 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
'%s' % (self.GetIssue(), self.GetIssueURL()))
if not title:
if options.message:
# For compatibility with Rietveld, if -m|--message is given on
# command line, title should be the first line of that message,
# which shouldn't be confused with CL description.
default_title = options.message.strip().split()[0]
# When uploading a subsequent patchset, -m|--message is taken
# as the patchset title if --title was not provided.
title = options.message.strip()
else:
default_title = RunGit(
['show', '-s', '--format=%s', 'HEAD']).strip()

Loading…
Cancel
Save