/** * Set up submodule URLs so that they correspond to the remote pertaining to * the revision that has been checked out. */ public void setupSubmoduleUrls(Revision rev, TaskListener listener) throws GitException { String remote; Iterator<Branch> bi = rev.getBranches().iterator(); if (bi.hasNext()) { // this is supposed to be a remote branch String b = bi.next().getName(); if (b != null) { int slash = b.indexOf('/'); if (slash == -1) { throw new GitException("no remote from branch name (" + b + ")"); } remote = getDefaultRemote(b.substring(0, slash)); } else { remote = getDefaultRemote(); } } else { remote = getDefaultRemote(); } setupSubmoduleUrls(remote, listener); }
setupSubmoduleUrls( remote, listener );