Esempio n. 1
0
        public string GetDotGitDirectory()
        {
            if (IsDynamicGitRepository)
            {
                return(DynamicGitRepositoryPath);
            }

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

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

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

            return(GitDirFinder.TreeWalkForGitDir(gitPath));
        }
Esempio n. 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);
        }