From 4729a895046908414b239f02256ac3334d1b2c15 Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Fri, 20 Dec 2024 22:43:14 +0100 Subject: [PATCH] tools/verifygitlog.py: Show invalid commit subjects in quotes. If a commit subject line has any trailing whitespace it won't match the repository validation rules, and the line will show up as part of the relevant error message. However, since there's no quotation marks around the offending text, the trailing whitespace may go unnoticed, and given that the commit message is then discarded when the commit operation is retried this can get fairly annoying. This commit simply modifies the error output for invalid subject lines to add quotation marks around the offending text, so trailing whitespace is much easier to see. Signed-off-by: Alessandro Gatti --- tools/verifygitlog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/verifygitlog.py b/tools/verifygitlog.py index ad9385e7ac..67215d5c5d 100755 --- a/tools/verifygitlog.py +++ b/tools/verifygitlog.py @@ -47,7 +47,7 @@ def git_log(pretty_format, *args): def diagnose_subject_line(subject_line, subject_line_format, err): - err.error("Subject line: " + subject_line) + err.error('Subject line: "' + subject_line + '"') if not subject_line.endswith("."): err.error('* must end with "."') if not re.match(r"^[^!]+: ", subject_line):