/** * {@inheritDoc} */ @Override public void decorateCheckoutCommand(GitSCM scm, Run<?, ?> build, GitClient git, TaskListener listener, CheckoutCommand cmd) throws IOException, InterruptedException, GitException { listener.getLogger().println("Enabling Git LFS pull"); List<RemoteConfig> repos = scm.getParamExpandedRepos(build, listener); // repos should never be empty, but check anyway if (!repos.isEmpty()) { // Pull LFS files from the first configured repository. // Same technique is used in GitSCM and CLoneOption. // Assumes the passed in scm represents a single repository, or if // multiple repositories are in use, the first repository in the // configuration is treated as authoritative. // Git plugin does not support multiple independent repositories // in a single job definition. cmd.lfsRemote(repos.get(0).getName()); } }