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