Skip to content

Commit

Permalink
fix(commit): trim the trailing newline for git2 commits (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun authored Sep 21, 2024
1 parent 8bebbf9 commit 1cdbbf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-cliff-core/src/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl<'a> From<&GitCommit<'a>> for Commit<'a> {
fn from(commit: &GitCommit<'a>) -> Self {
Commit {
id: commit.id().to_string(),
message: commit.message().unwrap_or_default().to_string(),
message: commit.message().unwrap_or_default().trim_end().to_string(),
author: commit.author().into(),
committer: commit.committer().into(),
merge_commit: commit.parent_count() > 1,
Expand Down

0 comments on commit 1cdbbf6

Please sign in to comment.