public TestRepoData(TestData test, string repoName) { RepoPath = test.TestPath.Combine("IOTestsRepo", repoName); DotGitPath = RepoPath.Combine(".git"); if (DotGitPath.FileExists()) { DotGitPath = DotGitPath.ReadAllLines().Where(x => x.StartsWith("gitdir:")) .Select(x => x.Substring(7).Trim().ToSPath()).First(); } BranchesPath = DotGitPath.Combine("refs", "heads"); RemotesPath = DotGitPath.Combine("refs", "remotes"); DotGitIndex = DotGitPath.Combine("index"); DotGitHead = DotGitPath.Combine("HEAD"); DotGitConfig = DotGitPath.Combine("config"); }
public void Create() { RepoPath.MakeSurePathExists(); }