8000 New function git_message_trailers_ext, providing the same options as "git interpret-trailers" by malcolmwood76 · Pull Request #7097 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

New function git_message_trailers_ext, providing the same options as "git interpret-trailers" #7097

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

malcolmwood76
Copy link

To provide the full trailer-parsing behaviour of "git interpret-trailers", this new function provides additional options to the git_message_trailers functionality. Specifically:

  • trim_empty - which optionally discards trailers with empty values.
  • no_divider - which optionally ignores "---" lines, that otherwise indicate the end of the message and the beginning of a "patch".
  • unfold - which optionally combines multi-line trailer values into a single line.

closes #6864

Malcolm Wood added 2 commits June 24, 2025 16:18
trailing whitespace from trailer values.
Provides three options for parsing message trailers - trim_empty,
no_divider and unfold - giving the same behaviour that these
options provide in "git interpret-trailers".
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.

Disagreement between git_message_trailers and git-rev-list --format=%(trailers)
1 participant
0