Exemple #1
0
        public string GetProjectRootDirectory()
        {
            if (IsDynamicGitRepository)
            {
                return(targetPath);
            }

            return(Directory.GetParent(GitDirFinder.TreeWalkForDotGitDir(targetPath)).FullName);
        }
Exemple #2
0
        public string GetDotGitDirectory()
        {
            if (IsDynamicGitRepository)
            {
                return(DynamicGitRepositoryPath);
            }

            return(GitDirFinder.TreeWalkForDotGitDir(targetPath));
        }
Exemple #3
0
        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);
        }