byte [] blob = getByteContent(repository, tree, ".gitmodules", false);
if (blob == null) {
return list;
}
try {
BlobBasedConfig config = new BlobBasedConfig(repository.getConfig(), blob);
for (String module : config.getSubsections("submodule")) {
String path = config.getString("submodule", module, "path");
String url = config.getString("submodule", module, "url");
list.add(new SubmoduleModel(module, path, url));
}
} catch (ConfigInvalidException e) {
LOGGER.error("Failed to load .gitmodules file for " + repository.getDirectory(), e);
}