public RemoteConfig getSubmoduleRepository(IGitAPI parentGit, RemoteConfig orig, String name) throws GitException { // The first attempt at finding the URL in this new code relies on // submoduleInit, submoduleSync, fixSubmoduleUrls already being executed // since the last fetch of the super project. (This is currently done // by calling git.setupSubmoduleUrls(...). ) String refUrl = parentGit.getSubmoduleUrl(name); return newRemoteConfig(name, refUrl, orig.getFetchRefSpecs().get(0), StringUtils.EMPTY); }
public RemoteConfig getSubmoduleRepository(IGitAPI parentGit, RemoteConfig orig, String name) throws GitException { // The first attempt at finding the URL in this new code relies on // submoduleInit, submoduleSync, fixSubmoduleUrls already being executed // since the last fetch of the super project. (This is currently done // by calling git.setupSubmoduleUrls(...). ) String refUrl = parentGit.getSubmoduleUrl(name); return newRemoteConfig(name, refUrl, orig.getFetchRefSpecs().get(0)); }
/** * Expand Parameters in the supplied remote repository with the parameter values provided in the given environment variables } * @param env Environment variables with parameter values * @param remoteRepository Remote repository with parameters * @return remote repository with expanded parameters */ public RemoteConfig getParamExpandedRepo(EnvVars env, RemoteConfig remoteRepository){ List<RefSpec> refSpecs = getRefSpecs(remoteRepository, env); return newRemoteConfig( getParameterString(remoteRepository.getName(), env), getParameterString(remoteRepository.getURIs().get(0).toPrivateString(), env), refSpecs.toArray(new RefSpec[refSpecs.size()])); }
/** * Expand parameters in {@link #remoteRepositories} with the parameter values provided in the given build * and return them. * * @return can be empty but never null. */ public List<RemoteConfig> getParamExpandedRepos(AbstractBuild<?, ?> build) { List<RemoteConfig> expandedRepos = new ArrayList<RemoteConfig>(); for (RemoteConfig oldRepo : Util.fixNull(remoteRepositories)) { expandedRepos.add(newRemoteConfig(oldRepo.getName(), oldRepo.getURIs().get(0).toPrivateString(), new RefSpec(getRefSpec(oldRepo, build)))); } return expandedRepos; }
/** * Expand parameters in {@link #remoteRepositories} with the parameter values provided in the given build * and return them. * * @return can be empty but never null. */ public List<RemoteConfig> getParamExpandedRepos(AbstractBuild<?, ?> build) { List<RemoteConfig> expandedRepos = new ArrayList<RemoteConfig>(); for (RemoteConfig oldRepo : Util.fixNull(remoteRepositories)) { expandedRepos.add(newRemoteConfig(oldRepo.getName(), oldRepo.getURIs().get(0).toPrivateString(), new RefSpec(getRefSpec(oldRepo, build)), getRemoteConfigTargetDir(oldRepo))); } return expandedRepos; }
newRemoteConfig("origin", source, new RefSpec("+refs/heads/*:refs/remotes/origin/*"))); if (branch != null) { branches.add(new BranchSpec(branch));
remoteRepositories.add(newRemoteConfig("origin", source, rs.toArray(new RefSpec[rs.size()]))); if (branch != null) { branches.add(new BranchSpec(branch));
newRemoteConfig("origin", source, new RefSpec("+refs/heads/*:refs/remotes/origin/*"),StringUtils.EMPTY)); if (branch != null) { branches.add(new BranchSpec(branch));