Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c7abfe63cd86b0c7b3daf6555eaaa0849085cfaa
https://github.com/WebKit/WebKit/commit/c7abfe63cd86b0c7b3daf6555eaaa0849085cfaa
Author: Tim Horton <[email protected]>
Date: 2026-06-23 (Tue, 23 Jun 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
Log Message:
-----------
git commit --amend keeps reordering my carefully-crafted commit messages
https://bugs.webkit.org/show_bug.cgi?id=317591
rdar://180311337
Reviewed by Abrar Rahman Protyasha and Wenson Hsieh.
I often reorder and group blocks of changes in the commit message.
Since 295625@main, upon amending, these changes are lost.
Make the reconciliation a bit smarter, keeping the user-generated ordering and
grouping.
New files are added at the end, old files are still deleted, and lose their
per-file comments, but do not remove block comments (since there's a good chance
the block comment is still relevant to earlier listed files, and if that's not
true, it's better for the user to fix it up themselves).
* Tools/Scripts/hooks/prepare-commit-msg:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/commit_parser.py:
(CommitMessageParser._file_identity):
(CommitMessageParser):
(CommitMessageParser._group_into_blocks):
(CommitMessageParser.reconcile_with_changed_files):
(CommitMessageParser._function_identity):
(CommitMessageParser._trailing_notes):
(CommitMessageParser._add_new_functions):
*
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_parser_unittest.py:
(TestCommitParser):
(TestCommitParser.lines):
(TestCommitParser.assert_reconcile):
Canonical link: https://commits.webkit.org/315682@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications