Skip to content

add convenience methods for common Git trailers #2030

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
May 28, 2025

Conversation

ralphmodales
Copy link
Contributor

This PR implements convenient methods for extracting commit authors from trailers as suggested in issue #1804.

The main changes are adding case-insensitive detection methods to TrailerRef for common trailer types like signed-off-by and co-authored-by, along with filtering methods on the Trailers iterator and high-level convenience methods on CommitRef to easily extract all authors from squashed commits that contain multiple contributors.

@ralphmodales ralphmodales force-pushed the trailer-conviences branch 2 times, most recently from bbab7b2 to 55ddac4 Compare May 28, 2025 10:51
@Byron Byron force-pushed the trailer-conviences branch from 55ddac4 to 834ae7a Compare May 28, 2025 12:40
@Byron Byron force-pushed the trailer-conviences branch from 834ae7a to 6c6dfd0 Compare May 28, 2025 12:41
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, much appreciated.

Please note that I put a refactor on top that essentially removed the Vec<_> portions of the API.

Something one could consider adding is a way to parse the authors as actual gix_actor::Identity for even more convenience. There it would make sense to return Result<Vec<_>, _>.

@Byron Byron enabled auto-merge May 28, 2025 12:44
@Byron Byron merged commit 3820a0f into GitoxideLabs:main May 28, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants