private void EnsureRepoIsPresent(IGitRepository repo)
        {
            var fileOps  = (IFileOperationsExecuter)this.Agent;
            var repoPath = repo.GetFullRepositoryPath(fileOps);

            if (!fileOps.DirectoryExists(repoPath) || !fileOps.DirectoryExists(fileOps.CombinePath(repoPath, ".git")))
            {
                fileOps.CreateDirectory(repoPath);
                this.GitClient.CloneRepo(repo);
            }
        }
Example #2
0
 protected ProcessResults ExecuteGitCommand(IGitRepository repo, string command, params string[] args)
 {
     return(this.Provider.ExecuteCommandLine(this.GitExePath, command + " " + string.Join(" ", args), repo.GetFullRepositoryPath(this.Provider.Agent)));
 }
Example #3
0
 protected ProcessResults ExecuteGitCommand(IGitRepository repo, string command, params string[] args)
 {
     return this.Provider.ExecuteCommandLine(this.GitExePath, command + " " + string.Join(" ", args), repo.GetFullRepositoryPath(this.Provider.Agent));
 }
 private void EnsureRepoIsPresent(IGitRepository repo)
 {
     var fileOps = (IFileOperationsExecuter)this.Agent;
     var repoPath = repo.GetFullRepositoryPath(fileOps);
     if (!fileOps.DirectoryExists2(repoPath) || !fileOps.DirectoryExists2(fileOps.CombinePath(repoPath, ".git")))
     {
         fileOps.CreateDirectory(repoPath);
         this.GitClient.CloneRepo(repo);
     }
 }