Sep.Git.Tfs.Commands.Clone.InitGitDir C# (CSharp) Method

InitGitDir() private method

private InitGitDir ( string gitRepositoryPath ) : bool
gitRepositoryPath string
return bool
        private bool InitGitDir(string gitRepositoryPath)
        {
            bool repositoryDirCreated = false;
            var di = new DirectoryInfo(gitRepositoryPath);
            if (di.Exists)
            {
                bool isDebuggerAttached = false;
            #if DEBUG
                isDebuggerAttached = Debugger.IsAttached;
            #endif
                if (!isDebuggerAttached && !_resumable)
                {
                    if (di.EnumerateFileSystemInfos().Any())
                        throw new GitTfsException("error: Specified git repository directory is not empty");
                }
            }
            else
            {
                repositoryDirCreated = true;
                di.Create();
            }
            return repositoryDirCreated;
        }