Class GitHandler

java.lang.Object
kth.soffgrupp.se.GitHandler

class GitHandler
extends Object
The purpose of this class is to function as a Git interface to be able to clone and checkout a repo
  • Field Details

    • directory

      private File directory
  • Constructor Details

    • GitHandler

      public GitHandler​(String dir)
      Creates a new GitHandler instance
      Parameters:
      dir - The directory to clone the repository to
  • Method Details

    • checkout

      public void checkout​(String repo, String branch) throws org.eclipse.jgit.api.errors.GitAPIException
      Checkout a certain branch on a repo
      Parameters:
      repo - the repository URL
      branch - the branch name
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException
    • clean

      public void clean()
      Do some clean up of the directory