application.PartialCommitFetch.kt Maven / Gradle / Ivy
package application
import io.specmatic.core.git.GitCommand
import io.specmatic.core.utilities.exceptionCauseMessage
val getFileContentAtSpecifiedCommit = {
gitRoot: GitCommand -> { relativeContractPath: String -> { contractPath: String -> { commit: String ->
try {
Outcome(gitRoot.show(commit, relativeContractPath).trim())
} catch (e: Throwable) {
Outcome(null, "Could not load ${commit}:${contractPath} because of error:\n${exceptionCauseMessage(e)}")
}
} } } }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy