Class Git


  • public class Git
    extends Object
    This is the factory class for Repository instances.
    • Method Detail

      • open

        public static Repository open​(File directory)
                               throws IOException
        Returns a repository instance working in the given directory.
        Parameters:
        directory - the directory where the repository is.
        Returns:
        the new repository object.
        Throws:
        NullPointerException - if the given object is null
        IllegalArgumentException - if the given object is illegal for some reason, like referring to an illegal repository
        IOException - in case of any I/O issue accessing the repository
      • open

        public static Repository open​(String directory)
                               throws IOException
        Returns a repository instance working in the given directory.
        Parameters:
        directory - the directory where the repository is.
        Returns:
        the new repository object.
        Throws:
        NullPointerException - if the given object is null
        IllegalArgumentException - if the given object is illegal for some reason, like referring to an illegal repository
        IOException - in case of any I/O issue accessing the repository