org.eclipse.jgit.internal.storage.file.FileRepository .
Applications must set one of setGitDir(File) or
setWorkTree(File), or use readEnvironment() or
findGitDir() in order to configure the minimum property set
necessary to open a repository.
Single repository applications trying to be compatible with other Git implementations are encouraged to use a model such as:
new FileRepositoryBuilder() // .setGitDir(gitDirArgument) // --git-dir if supplied, no-op if null .readEnvironment() // scan environment GIT_* variables .findGitDir() // scan up the file system tree .build()
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Repository | build()
Overrides org. Create a repository matching the configuration in this builder. |
| public static Repository | Returns: a repository matching this configuration.GIT_DIR, the repository meta directory.Convenience factory method to construct a
|
| FileRepositoryBuilder | back to summary |
|---|---|
| public FileRepositoryBuilder() | |
| build | back to summary |
|---|---|
| public Repository build() throws IOException Overrides org. Doc from org. Create a repository matching the configuration in this builder. If an option was not set, the build method will try to default the option based on other options. If insufficient information is available, an exception is thrown to the caller. Create a repository matching the configuration in this builder. If an option was not set, the build method will try to default the option based on other options. If insufficient information is available, an exception is thrown to the caller.
| |
| create | back to summary |
|---|---|
| public static Repository create(File gitDir) throws IOException Convenience factory method to construct a
| |