From 1cdbbf604c27c8a597f72985b1d15359244e5186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sat, 21 Sep 2024 17:39:30 +0200 Subject: [PATCH] fix(commit): trim the trailing newline for git2 commits (#872) --- git-cliff-core/src/commit.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-cliff-core/src/commit.rs b/git-cliff-core/src/commit.rs index 19b9a0cc33..c5414fce7b 100644 --- a/git-cliff-core/src/commit.rs +++ b/git-cliff-core/src/commit.rs @@ -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,