git-cl: use latest commit message in no-squash mode for presubmit

In no-squash mode, when uploading the change, the latest commit message
will be used as the CL description based on my experiment ([1] is never
honored). Therefore, no-squash mode should always use the commit message
as the CL description to run presubmit rather the current description in
the CL

[1]:
https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:git_cl.py;l=3232;drc=2bfa28f442009c4db0735c8789c611f3cfb3031c

Change-Id: I0ca45189095817dbedc916c7b882549c8f0868a1
Bug: 404309440
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6426443
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
changes/43/6426443/5
Yiwei Zhang 2 months ago committed by LUCI CQ
parent acdf15a207
commit 718c314171

@ -1842,7 +1842,7 @@ class Changelist(object):
description = '\n'.join(l.rstrip() for l in sys.stdin)
elif description == '+':
description = _create_description_from_log(git_diff_args)
elif self.GetIssue():
elif self.GetIssue() and options.squash:
description = self.FetchDescription()
elif options.message:
description = options.message

Loading…
Cancel
Save