MCPcopy Create free account
hub / github.com/GerritCodeReview/gerrit / InitGitManager

Class InitGitManager

java/com/google/gerrit/pgm/init/InitGitManager.java:28–49  ·  view source on GitHub ↗

Initialize the GitRepositoryManager configuration section.

Source from the content-addressed store, hash-verified

26
27/** Initialize the GitRepositoryManager configuration section. */
28@Singleton
29class InitGitManager implements InitStep {
30 private final ConsoleUI ui;
31 private final Section gerrit;
32
33 @Inject
34 InitGitManager(ConsoleUI ui, Section.Factory sections) {
35 this.ui = ui;
36 this.gerrit = sections.get("gerrit", null);
37 }
38
39 @Override
40 public void run() {
41 ui.header("Git Repositories");
42
43 Path d = gerrit.path("Location of Git repositories", "basePath", "git");
44 if (d == null) {
45 throw die("gerrit.basePath is required");
46 }
47 FileUtil.mkdirsOrDie(d, "Cannot create");
48 }
49}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected