Class FileRepositoryBuilder

    • Constructor Detail

      • FileRepositoryBuilder

        public FileRepositoryBuilder()
    • Method Detail

      • build

        public Repository build()
                         throws IOException
        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.

        Overrides:
        build in class BaseRepositoryBuilder<FileRepositoryBuilder,​Repository>
        Returns:
        a repository matching this configuration. The caller is responsible to close the repository instance when it is no longer needed.
        Throws:
        IOException - the repository could not be accessed to configure the rest of the builder's parameters.
        Since:
        3.0
      • create

        public static Repository create​(File gitDir)
                                 throws IOException
        Convenience factory method to construct a FileRepository.
        Parameters:
        gitDir - GIT_DIR, the repository meta directory.
        Returns:
        a repository matching this configuration.
        Throws:
        IOException - the repository could not be accessed to configure the rest of the builder's parameters.
        Since:
        3.0