Respect -t/--title in initial cl uploads to Gerrit
BUG=674254
Change-Id: Icdc572648dfffeca7e28f327e085f64985221ce9
Reviewed-on: https://chromium-review.googlesource.com/425823
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 35284d1..c4d7517 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -1262,6 +1262,15 @@
((['git', 'log', '--pretty=format:%s\n\n%b',
'fake_ancestor_sha..HEAD'],),
description)]
+ if squash:
+ title = 'Initial_upload'
+ else:
+ if not title:
+ calls += [
+ ((['git', 'show', '-s', '--format=%s', 'HEAD'],), ''),
+ (('Title for patchset []: ',), 'User input'),
+ ]
+ title = 'User_input'
if not git_footers.get_footer_change_id(description) and not squash:
calls += [
# DownloadGerritHook(False)
@@ -1307,16 +1316,6 @@
expected_upstream_ref + '..' + ref_to_push],), ''),
]
-
- if not title:
- if issue:
- calls += [
- ((['git', 'show', '-s', '--format=%s', 'HEAD'],), ''),
- (('Title for patchset []: ',), 'User input'),
- ]
- title = 'User_input'
- else:
- title = 'Initial_upload'
if title:
if ref_suffix:
ref_suffix += ',m=' + title