Skip to content

Commit 4729a89

Browse files
agattidpgeorge
authored andcommitted
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 <[email protected]>
1 parent 7ca6e5e commit 4729a89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/verifygitlog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def git_log(pretty_format, *args):
4747

4848

4949
def diagnose_subject_line(subject_line, subject_line_format, err):
50-
err.error("Subject line: " + subject_line)
50+
err.error('Subject line: "' + subject_line + '"')
5151
if not subject_line.endswith("."):
5252
err.error('* must end with "."')
5353
if not re.match(r"^[^!]+: ", subject_line):

0 commit comments

Comments
 (0)