Example usage for org.eclipse.jgit.lib Repository getRemoteNames

List of usage examples for org.eclipse.jgit.lib Repository getRemoteNames

Introduction

In this page you can find the example usage for org.eclipse.jgit.lib Repository getRemoteNames.

Prototype

@NonNull
public Set<String> getRemoteNames() 

Source Link

Document

Get the names of all known remotes

Usage

From source file:com.hazelcast.simulator.utils.jars.GitSupport.java

License:Open Source License

private void fetchAllRepositories(Git git) throws GitAPIException {
    Repository repository = git.getRepository();
    Set<String> remotes = repository.getRemoteNames();
    for (String remoteRepository : remotes) {
        git.fetch().setRemote(remoteRepository).call();
    }/*from  ww  w  . j  a  v  a2 s .  c o m*/
}

From source file:jbyoshi.gitupdate.processor.RemoteProcessor.java

License:Apache License

@Override
public void registerTasks(Repository repo, Git git, Task root) throws Exception {
    Task me = root.newChild(getClass().getSimpleName());
    for (String remote : repo.getRemoteNames()) {
        me.newChild(remote, report -> {
            try {
                process(repo, git, remote, Constants.R_REMOTES + remote + "/", report);
            } catch (Exception e) {
                report.newErrorChild(e);
            }//from  w  w  w  .  j a  va2 s  .  com
        });
    }
}