From 33d287bdc34fab70693d2cfffc77fb19498ab7cf Mon Sep 17 00:00:00 2001 From: Alexander Goussas Date: Sat, 25 Oct 2025 23:08:23 -0500 Subject: [PATCH] fix: handle case where we are running the task from the base branch --- .../changelog/git/commands/GetCurrentBranchCommitsCommand.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog-plugin/src/main/kotlin/io/github/aloussase/changelog/git/commands/GetCurrentBranchCommitsCommand.kt b/changelog-plugin/src/main/kotlin/io/github/aloussase/changelog/git/commands/GetCurrentBranchCommitsCommand.kt index 975b448..cd6c564 100644 --- a/changelog-plugin/src/main/kotlin/io/github/aloussase/changelog/git/commands/GetCurrentBranchCommitsCommand.kt +++ b/changelog-plugin/src/main/kotlin/io/github/aloussase/changelog/git/commands/GetCurrentBranchCommitsCommand.kt @@ -10,7 +10,8 @@ class GetCurrentBranchCommitsCommand( get() = "git log $baseBranch..HEAD --no-merges --oneline --pretty=format:\"%an|%s\"" override fun transform(rawOutput: String): List = - rawOutput + if (rawOutput.isEmpty()) emptyList() + else rawOutput .split("\n") .map { it.split("|") } .map { RawCommit(it[0], it[1]) } -- 2.43.0