[repo] port RemoteOriginUrl to git#

This commit is contained in:
Hylke Bons 2010-10-10 17:13:51 +01:00
parent 13e749fdc0
commit aaf48504a3

View file

@ -263,7 +263,7 @@ namespace SparkleLib {
Process.StartInfo.WorkingDirectory = LocalPath;
RemoteName = Path.GetFileNameWithoutExtension (RemoteOriginUrl);
RemoteOriginUrl = GetRemoteOriginUrl ();
RemoteOriginUrl = Config ["remote.origin.url"];
Domain = GetDomain (RemoteOriginUrl);
Description = GetDescription ();
@ -973,27 +973,6 @@ namespace SparkleLib {
}
// Gets the url of the remote repo, example: "ssh://git@git.gnome.org/project"
public string GetRemoteOriginUrl ()
{
string remote_origin_url;
Process process = new Process ();
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.FileName = "git";
process.StartInfo.WorkingDirectory = LocalPath;
process.StartInfo.Arguments = "config --get remote.origin.url";
process.Start ();
remote_origin_url = process.StandardOutput.ReadToEnd ().Trim ();
return remote_origin_url;
}
// Returns a list of latest commits
public List <SparkleCommit> GetCommits (int count) // TODO: Port to HashSet because it is quicker
{