Search in sources :

Example 21 with GitCommandLine

use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.

the class SubmoduleUpdateCommandImpl method call.

public void call() throws VcsException {
    GitCommandLine cmd = getCmd();
    cmd.addParameter("submodule");
    cmd.addParameter("update");
    if (myForce)
        cmd.addParameter("--force");
    if (myDepth != null) {
        cmd.addParameter("--depth=" + myDepth);
    }
    runCmd(cmd);
}
Also used : GitCommandLine(jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine)

Example 22 with GitCommandLine

use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.

the class RevParseCommandImpl method call.

@Override
public String call() throws VcsException {
    GitCommandLine cmd = getCmd();
    cmd.addParameter("rev-parse");
    if (myShallowRepository) {
        cmd.addParameter("--is-shallow-repository");
    }
    if (myVerifyParam != null) {
        cmd.addParameters("--verify", myVerifyParam);
    }
    if (ref != null)
        cmd.addParameter(ref);
    ExecResult r = CommandUtil.runCommand(cmd);
    return r.getStdout().trim();
}
Also used : GitCommandLine(jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine) ExecResult(jetbrains.buildServer.ExecResult)

Example 23 with GitCommandLine

use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.

the class SubmoduleSyncCommandImpl method call.

public void call() throws VcsException {
    GitCommandLine cmd = getCmd();
    cmd.addParameter("submodule");
    cmd.addParameter("sync");
    CommandUtil.runCommand(cmd);
}
Also used : GitCommandLine(jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine)

Example 24 with GitCommandLine

use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.

the class UpdateIndexCommandImpl method call.

@Override
public void call() throws VcsException {
    GitCommandLine cmd = getCmd();
    cmd.addParameters("update-index");
    if (myQuiet)
        cmd.addParameter("-q");
    if (myReallyRefresh)
        cmd.addParameter("--really-refresh");
    runCmd(cmd);
}
Also used : GitCommandLine(jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine)

Example 25 with GitCommandLine

use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.

the class UpdateRefBatchCommandImpl method call.

public void call() throws VcsException {
    GitCommandLine cmd = getCmd();
    cmd.addParameter("update-ref");
    cmd.addParameter("--stdin");
    cmd.addParameter("-z");
    byte[] input = myInput.toByteArray();
    CommandUtil.runCommand(cmd.stdErrExpected(false), input);
}
Also used : GitCommandLine(jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine)

Aggregations

GitCommandLine (jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine)36 NotNull (org.jetbrains.annotations.NotNull)6 GitVersion (jetbrains.buildServer.buildTriggers.vcs.git.GitVersion)5 ExecResult (jetbrains.buildServer.ExecResult)4 File (java.io.File)3 VcsException (jetbrains.buildServer.vcs.VcsException)3 AgentGitCommandLine (jetbrains.buildServer.buildTriggers.vcs.git.agent.AgentGitCommandLine)2 AgentGitFacadeImpl (jetbrains.buildServer.buildTriggers.vcs.git.agent.AgentGitFacadeImpl)2 FetchCommandImpl (jetbrains.buildServer.buildTriggers.vcs.git.command.impl.FetchCommandImpl)2 StubContext (jetbrains.buildServer.buildTriggers.vcs.git.command.impl.StubContext)2 SkipException (org.testng.SkipException)2 Test (org.testng.annotations.Test)2 ShowRefResult (jetbrains.buildServer.buildTriggers.vcs.git.agent.command.ShowRefResult)1 Nullable (org.jetbrains.annotations.Nullable)1