List of usage examples for org.eclipse.jgit.submodule SubmoduleWalk getConfigUrl
public String getConfigUrl() throws IOException, ConfigInvalidException
From source file:com.bacoder.scmtools.git.internal.CloneAndProcessCommand.java
License:Apache License
@Override protected void cloneSubmodules(Repository repository) throws IOException, GitAPIException { SubmoduleWalk generator; if (isInMemory()) { generator = new InMemorySubmoduleWalk(repository, submodulesConfig); try {//from www . j ava 2s . co m DirCache index = repository.readDirCache(); generator.setTree(new DirCacheIterator(index)); } catch (IOException e) { generator.release(); throw e; } } else { generator = SubmoduleWalk.forIndex(repository); } try { while (generator.next()) { if (generator.getConfigUrl() != null) { continue; } String path = generator.getPath(); String url = generator.getRemoteUrl(); CloneAndProcessCommand command = new CloneAndProcessCommand(path, config).setProcessor(processor); command.setURI(url).setCloneSubmodules(true); command.call(); } } catch (ConfigInvalidException e) { throw new IOException("Config invalid", e); } }