Skip to content

Fix message trailer parsing #6761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 16, 2024
Merged

Fix message trailer parsing #6761

merged 2 commits into from
Mar 16, 2024

Conversation

ethomson
Copy link
Member

Update message trailer parsing to match git behavior for ignoring patch attachments.

Fixes #6760

We never test the lengths of the two arrays, so a short return from
`git_message_trailers` will match erroneously.
Git looks explicitly for `---` followed by whitespace (`isspace()`) to
determine when a patch line begins in a commit message. Match that
behavior. This ensures that we don't treat (say) `----` as a patch line
incorrectly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

---- in commit message breaks trailer parsing
1 participant