1 package io.github.aloussase.changelog.git.commands
3 import io.github.aloussase.changelog.git.RawCommit
5 class GetCurrentBranchCommitsCommand(
7 ) : AbstractGitCommand<List<RawCommit>>() {
9 override val commandLine: String
10 get() = "git log $baseBranch..HEAD --no-merges --oneline --pretty=format:\"%an|%s\""
12 override fun transform(rawOutput: String): List<RawCommit> =
15 .map { it.split("|") }
16 .map { RawCommit(it[0], it[1]) }