use of org.commonjava.indy.subsys.git.GitConfig in project indy by Commonjava.
the class RevisionsManager method setup.
@PostConstruct
public void setup() {
try {
final File dataDir = dataFileManager.getDetachedDataBasedir();
final File gitignore = new File(dataDir, ".gitignore");
dataDir.mkdirs();
FileUtils.write(gitignore, join(DATA_DIR_GITIGNORES, "\n"));
final GitConfig dataConf = new GitConfig(dataDir, revisionsConfig.getDataUpstreamUrl(), true).setRemoteBranchName(revisionsConfig.getBranchName()).setUserEmail(revisionsConfig.getUserEmail());
dataFileGit = new GitManager(dataConf);
} catch (GitSubsystemException | IOException e) {
throw new IllegalStateException("Failed to start revisions manager: " + e.getMessage(), e);
} finally {
}
}
Aggregations