/** {@inheritDoc} */ public Map<String, ObjectId> getRemoteReferences(String remoteRepoUrl, String pattern, boolean headsOnly, boolean tagsOnly) throws GitException, InterruptedException { return proxy.getRemoteReferences(remoteRepoUrl, pattern, headsOnly, tagsOnly); }
Map<String, ObjectId> remoteReferences = client.getRemoteReferences(getRemote(), null, false, false); if (remoteReferences.containsKey(Constants.HEAD)) { ObjectId head = remoteReferences.get(Constants.HEAD);
@Override public Void run(GitClient client, String remoteName) throws IOException, InterruptedException { final Repository repository = client.getRepository(); try (RevWalk walk = new RevWalk(repository); GitSCMSourceRequest request = context.newRequest(AbstractGitSCMSource.this, listener)) { Map<String, ObjectId> remoteReferences = null; if (context.wantBranches() || context.wantTags()) { listener.getLogger().println("Listing remote references..."); remoteReferences = client.getRemoteReferences( client.getRemoteUrl(remoteName), null, context.wantBranches(), context.wantTags() ); } if (context.wantBranches()) { discoverBranches(repository, walk, request, remoteReferences); } if (context.wantTags()) { discoverTags(repository, walk, request, remoteReferences); } } return null; }