use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class FetchCommandImpl method call.
public void call() throws VcsException {
final GitCommandLine cmd = getCmd();
final GitVersion gitVersion = cmd.getGitVersion();
cmd.addParameter("fetch");
if (myQuite)
cmd.addParameter("-q");
if (myShowProgress)
cmd.addParameter("--progress");
if (myDepth != null)
cmd.addParameter("--depth=" + myDepth);
if (!myFetchTags)
cmd.addParameter("--no-tags");
if (gitVersion.isGreaterThan(new GitVersion(1, 7, 3))) {
// we process submodules separately
cmd.addParameter("--recurse-submodules=no");
}
cmd.setHasProgress(true);
if (myRefSpecs.size() > 1 && GitVersion.fetchSupportsStdin(gitVersion)) {
cmd.addParameter("--stdin");
cmd.addParameter(getRemote());
runCmd(cmd.stdErrLogLevel("debug"), refSpecsToBytes(cmd));
} else {
cmd.addParameter(getRemote());
myRefSpecs.forEach(refSpec -> cmd.addParameter(refSpec));
runCmd(cmd.stdErrLogLevel("debug"));
}
}
Aggregations