fix: handle git scissor line in commit message parsing (RDT-1556)#32
Conversation
👋 Hello oberwager, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. Click to see more instructions ...
Review and merge process you can expect ...
|
kumekay
left a comment
There was a problem hiding this comment.
Thank you for the contribution,
LGTM,
@tomassebestik Could you please have a quick look too?
|
LGTM as well, code change is clear and tests passes. Merging |
|
@oberwager @kumekay The update is now available in new release version v1.11.0. 🎉 When a commit-linter version update is needed in your project, run: pre-commit autoupdate --repo https://github.com/espressif/conventional-precommit-linterwhile in the root of your Git project (local machine). This updates this hook version to the latest release. Thank you both! |
Description
Fixes commit message validation failure when using
git commit --verbose. The hook incorrectly validated diff content that appears after Git's scissor line (# ------------------------ >8 ------------------------), failing when diff lines exceeded the body length limit.Changes:
read_commit_message()to detect and strip content after the scissor lineRationale: Git's scissor line behavior is documented to ignore everything after this marker, but the linter was processing the entire file including verbose output.
Related
Testing
git commit --verboseconfirms fix