Class GitLoader
java.lang.Object
org.variantsync.diffdetective.load.GitLoader
Class for loading Git repositories from several sources.
- Author:
- Soeren Viegener, Paul Maximilian Bittner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.jgit.api.Git
fromDirectory
(Path pathToRepo) Loads a Git repository from a directorystatic org.eclipse.jgit.api.Git
fromRemote
(Path localPath, URI remoteURI) Loads a Git repository from a remote repositorystatic org.eclipse.jgit.api.Git
Loads a Git repository from a zipped repository.
-
Constructor Details
-
GitLoader
public GitLoader()
-
-
Method Details
-
fromDirectory
Loads a Git repository from a directory- Parameters:
pathToRepo
- the name of the directory where the git repository is located- Returns:
- a Git object of the repository
-
fromRemote
Loads a Git repository from a remote repository- Parameters:
localPath
- directory where the remote repository is cloned toremoteURI
- URI of the remote git repository- Returns:
- a Git object of the repository
-
fromZip
Loads a Git repository from a zipped repository. The zip is extracted to a directory put beside the zip and named after the zip without the zip extension.- Parameters:
pathToZip
- name of the zip file containing a git repository- Returns:
- a Git object of the repository
-