public void CloneOrPull(Action <string> logInfo)
        {
            var fullDirectory = Path.Combine(_gitRepository.LocalDirectory, _gitRepository.RepositoryName);

            if (Directory.Exists(fullDirectory))
            {
                _repositoryManager.Pull(ExecuteGitCommand);

                logInfo("Pull executed");
            }
            else
            {
                _repositoryManager.Clone(ExecuteGitCommand);

                logInfo("Clone executed");
            }
        }
Example #2
0
 public ITask Pull() => repositoryManager.Pull(CurrentRemote.Value.Name, CurrentBranch?.Name);
Example #3
0
 public ITask Pull()
 {
     return(repositoryManager.Pull(CurrentRemote.Value.Name, CurrentBranch?.Name));
 }