All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.specmatic.core.git.GitCommand.kt Maven / Gradle / Ivy

Go to download

Turn your contracts into executable specifications. Contract Driven Development - Collaboratively Design & Independently Deploy MicroServices & MicroFrontends.

There is a newer version: 2.0.37
Show newest version
package io.specmatic.core.git

import java.io.File

interface GitCommand {
    val workingDirectory: String
    fun add(): SystemGit
    fun add(relativePath: String): SystemGit
    fun commit(): SystemGit
    fun push(): SystemGit
    fun pull(): SystemGit
    fun resetHard(): SystemGit
    fun resetMixed(): SystemGit
    fun mergeAbort(): SystemGit
    fun checkout(branchName: String): SystemGit
    fun merge(branchName: String): SystemGit
    fun clone(gitRepositoryURI: String, cloneDirectory: File): SystemGit
    fun gitRoot(): String
    fun show(treeish: String, relativePath: String): String
    fun workingDirectoryIsGitRepo(): Boolean
    fun getChangedFiles(): List
    fun relativeGitPath(newerContractPath: String): Pair
    fun fileIsInGitDir(newerContractPath: String): Boolean
    fun inGitRootOf(contractPath: String): GitCommand
    fun shallowClone(gitRepositoryURI: String, cloneDirectory: File): SystemGit
    fun exists(treeish: String, relativePath: String): Boolean
    fun getCurrentBranch(): String
    fun statusPorcelain(): String
    fun fetch(): String
    fun revisionsBehindCount(): Int
    fun getRemoteUrl(name: String = "origin"): String
    fun checkIgnore(path: String): String
    fun getFilesChangeInCurrentBranch(): List
    fun getFileInTheDefaultBranch(fileName: String, currentBranch: String): File?
    fun currentBranch(): String {
        return ""
    }

    fun defaultBranch(): String {
        return ""
    }

    fun detachedHEAD(): String {
        return ""
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy