Rename method to create new organisation directory
Assign a proper name to the method responsible to create the new
empty directory for the GitHub organisation, ready to host the clone
of the GitHub Git repositories to import
Change-Id: I3347d15c71d1712d21b1ebf12076e6c08e5820a6
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/GitCloneStep.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/GitCloneStep.java
index 44fc1a1..2a56590 100644
--- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/GitCloneStep.java
+++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/GitCloneStep.java
@@ -45,10 +45,10 @@
super(gitConfig.gitHubUrl, organisation, repository, gitHubRepoFactory);
LOG.debug("GitHub Clone " + organisation + "/" + repository);
this.gitDir = gitConfig.gitDir.toFile();
- this.destinationDirectory = getDestinationDirectory(organisation, repository);
+ this.destinationDirectory = prepareTargetGitDirectory(organisation, repository);
}
- private File getDestinationDirectory(String organisation, String repository)
+ private File prepareTargetGitDirectory(String organisation, String repository)
throws GitDestinationAlreadyExistsException, GitDestinationNotWritableException {
File orgDirectory = new File(gitDir, organisation);
File destDirectory = new File(orgDirectory, repository + ".git");
@@ -90,10 +90,6 @@
return destDirectory.listFiles().length > 0;
}
- public File getDestinationDirectory() {
- return destinationDirectory;
- }
-
@Override
public boolean rollback() {
File gitDirectory = destinationDirectory;