public string GetDotGitDirectory() { if (IsDynamicGitRepository) { return(DynamicGitRepositoryPath); } return(GitDirFinder.TreeWalkForDotGitDir(targetPath)); }
public string GetProjectRootDirectory() { if (IsDynamicGitRepository) { return(targetPath); } return(Directory.GetParent(GitDirFinder.TreeWalkForDotGitDir(targetPath)).FullName); }
public string Prepare() { var gitPath = arguments.TargetPath; if (!string.IsNullOrWhiteSpace(arguments.TargetUrl)) { gitPath = GetGitInfoFromUrl(); } return(GitDirFinder.TreeWalkForGitDir(gitPath)); }
public string GetProjectRootDirectory() { if (IsDynamicGitRepository) { return(this.targetPath); } var gitDir = GitDirFinder.TreeWalkForDotGitDir(this.targetPath); if (String.IsNullOrEmpty(gitDir)) { throw new DirectoryNotFoundException("Can't find the .git directory in " + targetPath); } return(Directory.GetParent(gitDir).FullName); }