/** * {@inheritDoc} */ @Override public void decorateFetchCommand(GitSCM scm, GitClient git, TaskListener listener, FetchCommand cmd) throws IOException, InterruptedException, GitException { cmd.shallow(shallow); if (shallow && depth > 1) { cmd.depth(depth); } cmd.tags(!noTags); /* cmd.refspecs() not required. * FetchCommand already requires list of refspecs through its * from(remote, refspecs) method, no need to adjust refspecs * here on initial clone */ cmd.timeout(timeout); }
.depth(depth) .timeout(timeout) .tags(tags)