Преглед изворни кода

Merge "Make --git-dir optional for 'jgit init'"

tags/v0.12.1
Chris Aniszczyk пре 13 година
родитељ
комит
2df51d9427

+ 2
- 1
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java Прегледај датотеку

@@ -69,7 +69,8 @@ class Init extends TextBuiltin {
protected void run() throws Exception {
InitCommand command = Git.init();
command.setBare(bare);
command.setDirectory(new File(gitdir));
if (gitdir != null)
command.setDirectory(new File(gitdir));
Repository repository = command.call().getRepository();
out.println(MessageFormat.format(
CLIText.get().initializedEmptyGitRepositoryIn, repository

+ 1
- 1
org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java Прегледај датотеку

@@ -83,7 +83,7 @@ public class InitCommand implements Callable<Git> {
} else if (builder.getGitDir() == null) {
File d = new File(".");
if (!bare)
d = new File(d, Constants.DOT_GIT);
d = new File(d, Constants.DOT_GIT).getCanonicalFile();
builder.setGitDir(d);
}
Repository repository = builder.build();

Loading…
Откажи
Сачувај