Constructor and Description |
---|
InitCommand() |
Modifier and Type | Method and Description |
---|---|
Git |
call() |
InitCommand |
setBare(boolean bare)
Set whether the repository is bare or not
|
InitCommand |
setDirectory(File directory)
The optional directory associated with the init operation.
|
InitCommand |
setFs(FS fs)
Set the file system abstraction to be used for repositories created by
this command.
|
InitCommand |
setGitDir(File gitDir)
Set the repository meta directory (.git)
|
public Git call() throws GitAPIException
Executes the Init
command.
call
in interface Callable<Git>
Git
instance that owns the Repository
that it
wraps.GitAPIException
public InitCommand setDirectory(File directory) throws IllegalStateException
directory
- the directory to init toIllegalStateException
- if the combination of directory, gitDir and bare is illegal.
E.g. if for a non-bare repository directory and gitDir point
to the same directory of if for a bare repository both
directory and gitDir are specifiedpublic InitCommand setGitDir(File gitDir) throws IllegalStateException
gitDir
- the repository meta directoryIllegalStateException
- if the combination of directory, gitDir and bare is illegal.
E.g. if for a non-bare repository directory and gitDir point
to the same directory of if for a bare repository both
directory and gitDir are specifiedpublic InitCommand setBare(boolean bare)
bare
- whether the repository is bare or notIllegalStateException
- if the combination of directory, gitDir and bare is illegal.
E.g. if for a non-bare repository directory and gitDir point
to the same directory of if for a bare repository both
directory and gitDir are specifiedpublic InitCommand setFs(FS fs)
fs
- the abstraction.this
(for chaining calls).Copyright © 2020 Eclipse JGit Project. All rights reserved.