From 718c314171e579a9c651f0946024fd164111da3b Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Tue, 8 Apr 2025 10:51:21 -0700 Subject: [PATCH] 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 Reviewed-by: Gavin Mak --- git_cl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index e116abf6c..006f0360d 100755 --- a/git_cl.py +++ b/git_cl.py @@ -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