/** * Return a command object to execute a {@code Fetch} command * * @see <a href= * "http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html" * >Git documentation about Fetch</a> * @return a {@link org.eclipse.jgit.api.FetchCommand} used to collect all * optional parameters and to finally execute the {@code Fetch} * command */ public FetchCommand fetch() { return new FetchCommand(repo); }
/** * Returns a command object to execute a {@code Fetch} command * * @see <a * href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html" * >Git documentation about Fetch</a> * @return a {@link FetchCommand} used to collect all optional parameters * and to finally execute the {@code Fetch} command */ public FetchCommand fetch() { return new FetchCommand(repo); }
/** * Return a command object to execute a {@code Fetch} command * * @see <a href= * "http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html" * >Git documentation about Fetch</a> * @return a {@link org.eclipse.jgit.api.FetchCommand} used to collect all * optional parameters and to finally execute the {@code Fetch} * command */ public FetchCommand fetch() { return new FetchCommand(repo); }
private FetchResult fetch(Repository clonedRepo, URIish u) throws URISyntaxException, org.eclipse.jgit.api.errors.TransportException, IOException, GitAPIException { // create the remote config and save it RemoteConfig config = new RemoteConfig(clonedRepo.getConfig(), remote); config.addURI(u); final String dst = (bare ? Constants.R_HEADS : Constants.R_REMOTES + config.getName() + '/') + '*'; boolean fetchAll = cloneAllBranches || branchesToClone == null || branchesToClone.isEmpty(); config.setFetchRefSpecs(calculateRefSpecs(fetchAll, dst)); config.update(clonedRepo.getConfig()); clonedRepo.getConfig().save(); // run the fetch command FetchCommand command = new FetchCommand(clonedRepo); command.setRemote(remote); command.setProgressMonitor(monitor); command.setTagOpt(fetchAll ? TagOpt.FETCH_TAGS : TagOpt.AUTO_FOLLOW); configure(command); return command.call(); }
JGitText.get().pullTaskName)); FetchCommand fetch = new FetchCommand(repo).setRemote(remote) .setProgressMonitor(monitor).setTagOpt(tagOption) .setRecurseSubmodules(submoduleRecurseMode);
&& !submoduleRepo.hasObject(walk.getObjectId())) || recurseMode == FetchRecurseSubmodulesMode.YES) { FetchCommand f = new FetchCommand(submoduleRepo) .setProgressMonitor(monitor) .setTagOpt(tagOption)
private FetchResult fetch(Repository clonedRepo, URIish u) throws URISyntaxException, org.eclipse.jgit.api.errors.TransportException, IOException, GitAPIException { // create the remote config and save it RemoteConfig config = new RemoteConfig(clonedRepo.getConfig(), remote); config.addURI(u); final String dst = (bare ? Constants.R_HEADS : Constants.R_REMOTES + config.getName() + '/') + '*'; boolean fetchAll = cloneAllBranches || branchesToClone == null || branchesToClone.isEmpty(); config.setFetchRefSpecs(calculateRefSpecs(fetchAll, dst)); config.update(clonedRepo.getConfig()); clonedRepo.getConfig().save(); // run the fetch command FetchCommand command = new FetchCommand(clonedRepo); command.setRemote(remote); command.setProgressMonitor(monitor); command.setTagOpt(fetchAll ? TagOpt.FETCH_TAGS : TagOpt.AUTO_FOLLOW); configure(command); return command.call(); }
JGitText.get().pullTaskName)); FetchCommand fetch = new FetchCommand(repo); fetch.setRemote(remote); fetch.setProgressMonitor(monitor);
private FetchResult fetch(Repository clonedRepo, URIish u) throws URISyntaxException, org.eclipse.jgit.api.errors.TransportException, IOException, GitAPIException { // create the remote config and save it RemoteConfig config = new RemoteConfig(clonedRepo.getConfig(), remote); config.addURI(u); final String dst = (bare ? Constants.R_HEADS : Constants.R_REMOTES + config.getName() + "/") + "*"; //$NON-NLS-1$//$NON-NLS-2$ RefSpec refSpec = new RefSpec(); refSpec = refSpec.setForceUpdate(true); refSpec = refSpec.setSourceDestination(Constants.R_HEADS + "*", dst); //$NON-NLS-1$ config.addFetchRefSpec(refSpec); config.update(clonedRepo.getConfig()); clonedRepo.getConfig().save(); // run the fetch command FetchCommand command = new FetchCommand(clonedRepo); command.setRemote(remote); command.setProgressMonitor(monitor); command.setTagOpt(TagOpt.FETCH_TAGS); configure(command); List<RefSpec> specs = calculateRefSpecs(dst); command.setRefSpecs(specs); return command.call(); }
JGitText.get().pullTaskName)); FetchCommand fetch = new FetchCommand(repo).setRemote(remote) .setProgressMonitor(monitor).setTagOpt(tagOption) .setRecurseSubmodules(submoduleRecurseMode);
&& !submoduleRepo.hasObject(walk.getObjectId())) || recurseMode == FetchRecurseSubmodulesMode.YES) { FetchCommand f = new FetchCommand(submoduleRepo) .setProgressMonitor(monitor) .setTagOpt(tagOption)