Example #1
0
        public string GetDotGitDirectory()
        {
            if (IsDynamicGitRepository)
            {
                return(DynamicGitRepositoryPath);
            }

            return(GitDirFinder.TreeWalkForDotGitDir(targetPath));
        }
Example #2
0
        public string GetProjectRootDirectory()
        {
            if (IsDynamicGitRepository)
            {
                return(targetPath);
            }

            return(Directory.GetParent(GitDirFinder.TreeWalkForDotGitDir(targetPath)).FullName);
        }
Example #3
0
        public string Prepare()
        {
            var gitPath = arguments.TargetPath;

            if (!string.IsNullOrWhiteSpace(arguments.TargetUrl))
            {
                gitPath = GetGitInfoFromUrl();
            }

            return(GitDirFinder.TreeWalkForGitDir(gitPath));
        }
Example #4
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);
        }