Class RepositoryBuilder


public class RepositoryBuilder extends BaseRepositoryBuilder<RepositoryBuilder,Repository>
Base class to support constructing a Repository.

Applications must set one of BaseRepositoryBuilder.setGitDir(File) or BaseRepositoryBuilder.setWorkTree(File), or use BaseRepositoryBuilder.readEnvironment() or BaseRepositoryBuilder.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 RepositoryBuilder() //
                .setGitDir(gitDirArgument) // --git-dir if supplied, no-op if null
                .readEnviroment() // scan environment GIT_* variables
                .findGitDir() // scan up the file system tree
                .build()
 
See Also:
  • Constructor Details

    • RepositoryBuilder

      public RepositoryBuilder()