class CliGitInit implements IGitInit {

	public GitInitResponse init(File repoDirectory, GitInitOptions options)
	throws JavaGitException, IOException  {
		CheckUtilities.checkFileValidity(repoDirectory);
		GitInitParser parser = new GitInitParser();
		List<String> command = buildCommand(repoDirectory, options);
		GitInitResponse response =  (GitInitResponse) ProcessUtilities.runCommand(repoDirectory,
				command, parser);
		if (response.containsError()) {
			throw new JavaGitException(418001, "Git Init error");
		}
		return response;
	}

}