for (IndexEntry submodule : git.getSubmodules("HEAD")) {
File subdir = new File(workspace, submodule.getFile());
IGitAPI subGit = new GitAPI(git.getGitExe(), new FilePath(subdir), listener, git.getEnvironment());
GitUtils gu = new GitUtils(listener, subGit);
Collection<Revision> items = gu.filterTipBranches(gu.getAllBranchRevisions());
filterRevisions(submodule.getFile(), items);
moduleBranches.put(submodule, items);
}