diff --git a/git_cl.py b/git_cl.py index f0dba6e8e..bd06467af 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2896,12 +2896,16 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): assert len(change_ids) == 1 change_id = change_ids[0] + if options.reviewers or options.tbrs or options.add_owners_to: + change_desc.update_reviewers(options.reviewers, options.tbrs, + options.add_owners_to, change) + remote, upstream_branch = self.FetchUpstreamTuple(self.GetBranch()) parent = self._ComputeParent(remote, upstream_branch, custom_cl_base, options.force, change_desc) tree = RunGit(['rev-parse', 'HEAD:']).strip() ref_to_push = RunGit(['commit-tree', tree, '-p', parent, - '-m', message]).strip() + '-m', change_desc.description]).strip() else: change_desc = ChangeDescription( options.message or CreateDescriptionFromLog(git_diff_args)) @@ -2912,6 +2916,9 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): DownloadGerritHook(False) change_desc.set_description( self._AddChangeIdToCommitMessage(options, git_diff_args)) + if options.reviewers or options.tbrs or options.add_owners_to: + change_desc.update_reviewers(options.reviewers, options.tbrs, + options.add_owners_to, change) ref_to_push = 'HEAD' # For no-squash mode, we assume the remote called "origin" is the one we # want. It is not worthwhile to support different workflows for @@ -2930,10 +2937,6 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): 'single commit.') confirm_or_exit(action='upload') - if options.reviewers or options.tbrs or options.add_owners_to: - change_desc.update_reviewers(options.reviewers, options.tbrs, - options.add_owners_to, change) - # Extra options that can be specified at push time. Doc: # https://gerrit-review.googlesource.com/Documentation/user-upload.html refspec_opts = []