Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7c93fbd030b4def3bcfb152b52ea9f8aaa12073b
https://github.com/WebKit/WebKit/commit/7c93fbd030b4def3bcfb152b52ea9f8aaa12073b
Author: Zak Ridouh <[email protected]>
Date: 2026-08-16 (Sun, 16 Aug 2026)
Changed paths:
M Tools/Scripts/hooks/prepare-commit-msg
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/commit_parser.py
M
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_parser_unittest.py
M Tools/Scripts/prepare-ChangeLog
A
Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/testListForChangeLog.pl
Log Message:
-----------
git-webkit does not sort or update the Tests: section of a commit message
https://bugs.webkit.org/show_bug.cgi?id=321859
rdar://185018520
Reviewed by David Kilzer.
testListForChangeLog() sorted full paths and then stripped the LayoutTests
prefix when printing, so a Tools/TestWebKitAPI test printed after the layout
tests. Strip the prefix before sorting instead. testListForChangeLog.pl covers
the printed order.
Amending never regenerated the section. prepare-commit-msg passed
--no-mention-tests, so no test list was computed and the old section was copied
through, leaving new tests in the file list at the end. Compute the list and
reconcile it against the existing section.
reconcile_tests() rebuilds the section sorted when every entry is a test name.
When an entry carries prose, it keeps the section as written and appends only
the new tests, so hand-written notes keep their text and position. A name with
a space in it still counts as a path when it ends in a file extension, which
covers Tools/TestWebKitAPI/Tests/WebKit Swift/WebPageTests.swift.
Also fixes the ImportError fallback in amended_message(), which raised
NameError instead of falling back to the template.
Additionally, folks will need to run `git-webkit install-hooks` to pick up
this new behavior.
* Tools/Scripts/hooks/prepare-commit-msg:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/commit_parser.py:
(CommitMessageParser._test_entries):
(CommitMessageParser):
(CommitMessageParser._is_test_name):
(CommitMessageParser._tests_indent):
(CommitMessageParser._mentions_test):
(CommitMessageParser.reconcile_tests):
*
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_parser_unittest.py:
* Tools/Scripts/prepare-ChangeLog:
(generateNewChangeLogs):
(testListForChangeLog):
* Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/testListForChangeLog.pl:
Added.
Canonical link: https://commits.webkit.org/319270@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications