Package com.mooltiverse.oss.nyx.git
Class Git
- java.lang.Object
-
- com.mooltiverse.oss.nyx.git.Git
-
public class Git extends Object
This is the factory class forRepository
instances.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Repository
open(File directory)
Returns a repository instance working in the given directory.static Repository
open(String directory)
Returns a repository instance working in the given directory.
-
-
-
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 isnull
IllegalArgumentException
- if the given object is illegal for some reason, like referring to an illegal repositoryIOException
- 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 isnull
IllegalArgumentException
- if the given object is illegal for some reason, like referring to an illegal repositoryIOException
- in case of any I/O issue accessing the repository
-
-