Class GitLoader

java.lang.Object
org.variantsync.diffdetective.load.GitLoader

public class GitLoader extends Object
Class for loading Git repositories from several sources.
Author:
Soeren Viegener, Paul Maximilian Bittner
  • Constructor Details

    • GitLoader

      public GitLoader()
  • Method Details

    • fromDirectory

      public static org.eclipse.jgit.api.Git fromDirectory(Path pathToRepo)
      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

      public static org.eclipse.jgit.api.Git fromRemote(Path localPath, URI remoteURI)
      Loads a Git repository from a remote repository
      Parameters:
      localPath - directory where the remote repository is cloned to
      remoteURI - URI of the remote git repository
      Returns:
      a Git object of the repository
    • fromZip

      public static org.eclipse.jgit.api.Git fromZip(Path pathToZip)
      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