public AddRemote ( string name, string path ) : string | ||
name | string | |
path | string | |
return | string |
private void Clone(IHostedRepository repo) { string targetDir = GetTargetDir(); if (targetDir == null) return; string repoSrc = repo.CloneReadWriteUrl; string cmd = GitCommandHelpers.CloneCmd(repoSrc, targetDir); FormRemoteProcess formRemoteProcess = new FormRemoteProcess(new GitModule(null), AppSettings.GitCommand, cmd); formRemoteProcess.Remote = repoSrc; formRemoteProcess.ShowDialog(); if (formRemoteProcess.ErrorOccurred()) return; GitModule module = new GitModule(targetDir); if (_addRemoteAsTB.Text.Trim().Length > 0 && !string.IsNullOrEmpty(repo.ParentReadOnlyUrl)) { var error = module.AddRemote(_addRemoteAsTB.Text.Trim(), repo.ParentReadOnlyUrl); if (!string.IsNullOrEmpty(error)) MessageBox.Show(this, error, _strCouldNotAddRemote.Text); } if (GitModuleChanged != null) GitModuleChanged(this, new GitModuleEventArgs(module)); Close(); }