@Override public void decorateCloneCommand(GitSCM scm, Run<?, ?> build, GitClient git, TaskListener listener, CloneCommand cmd) throws IOException, InterruptedException, GitException { // we are doing a merge, so cannot permit a shallow clone cmd.shallow(false); }
if (shallow) { listener.getLogger().println("Using shallow clone"); cmd.shallow(); if (depth > 1) { listener.getLogger().println("shallow clone depth " + depth);
/** {@inheritDoc} */ public void clone(String url, String origin, boolean useShallowClone, String reference) throws GitException, InterruptedException { CloneCommand c = clone_().url(url).repositoryName(origin).reference(reference); if (useShallowClone) c.shallow(); c.execute(); }