diff options
author | Chris Aniszczyk <caniszczyk@gmail.com> | 2011-03-15 09:59:24 -0400 |
---|---|---|
committer | Code Review <codereview-daemon@eclipse.org> | 2011-03-15 09:59:24 -0400 |
commit | 2df51d942704e7dc8887acb4d76d8723c108cff0 (patch) | |
tree | 229d47baa0371a591002b8d523064987e1090e6e /org.eclipse.jgit.pgm/src | |
parent | ed2a8b5acfffba36b19738f313c2c1758ebf44bf (diff) | |
parent | 8e1b581d39a8e1eadfb8f2ab7590546ec89c9abe (diff) | |
download | jgit-2df51d942704e7dc8887acb4d76d8723c108cff0.tar.gz jgit-2df51d942704e7dc8887acb4d76d8723c108cff0.zip |
Merge "Make --git-dir optional for 'jgit init'"
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java index 98f086d460..e1e38e5bc8 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java +++ b/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 |