import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.InitCommand;
+import org.eclipse.jgit.lib.Repository;
import org.kohsuke.args4j.Option;
@Command(common = true, usage = "usage_CreateAnEmptyGitRepository")
InitCommand command = Git.init();
command.setBare(bare);
command.setDirectory(gitdir);
- command.call();
- out.println(MessageFormat.format(CLIText.get().initializedEmptyGitRepositoryIn, gitdir.getAbsolutePath()));
+ Repository repository = command.call().getRepository();
+ out.println(MessageFormat.format(
+ CLIText.get().initializedEmptyGitRepositoryIn, repository
+ .getDirectory().getAbsolutePath()));
}
}