IsGitRepositoryDir() public static method

public static IsGitRepositoryDir ( string dir ) : bool
dir string
return bool
Example #1
0
 public static ScmRepository create(string path)
 {
     if (Directory.Exists(path + @"\.svn") || Directory.Exists(path + @"\_svn"))
     {
         return(new SvnRepository(path, ScmRepository.PathType.Directory));
     }
     if (GitRepository.IsGitRepositoryDir(path))
     {
         return(new GitRepository(path));
     }
     return(null);
 }
Example #2
0
 public static ScmRepository create(string path)
 {
     if (SvnRepository.IsSvnRepositoryDir(path))
     {
         return(new SvnRepository(path, ScmRepository.PathType.Directory));
     }
     if (GitRepository.IsGitRepositoryDir(path))
     {
         return(new GitRepository(path, ScmRepository.PathType.Directory));
     }
     return(null);
 }