示例#1
0
 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);
 }
示例#2
0
        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");
        }