Exemple #1
0
  public Git(final File repository, final File dest) throws FileNotFoundException, Exception {

    checkIfRepoDirExists(repository);
    checkIfGitMetaDirExists(repository);

    if (dest != null) {
      runCommand(
          formatCommand("clone", repository.getAbsolutePath() + " " + dest.getAbsolutePath()));
      this.repository = dest;
    } else this.repository = repository;

    /* Sets environment */
    setEnv(this.repository);
  }