public string ToLocalPath(string projectPath) { if (!string.IsNullOrEmpty(paths.RepoProjectRelativePath)) { projectPath = UniGitPathHelper.SubtractDirectory(projectPath, UniGitPathHelper.ToUnityPath(paths.RepoProjectRelativePath)); } if (inSubModule) { return(UniGitPathHelper.SubtractDirectory(projectPath, gitSettings.ActiveSubModule)); } return(projectPath); }
public void SetRepoPath(string repoPath) { this.RepoPath = repoPath; if (!UniGitPathHelper.PathsEqual(repoPath, ProjectPath)) { RepoProjectRelativePath = UniGitPathHelper.SubtractDirectory(repoPath, ProjectPath); } SettingsFolderPath = UniGitPathHelper.Combine(repoPath, ".git", "UniGit"); SettingsFilePath = UniGitPathHelper.Combine(SettingsFolderPath, "Settings.json"); LogsFolderPath = SettingsFolderPath; LogsFilePath = UniGitPathHelper.Combine(LogsFolderPath, "log.txt"); CredentialsFilePath = UniGitPathHelper.Combine(SettingsFolderPath, "Credentials.json"); GitPath = UniGitPathHelper.Combine(RepoPath, ".git"); }