[repo] port RemoteOriginUrl to git#
This commit is contained in:
parent
13e749fdc0
commit
aaf48504a3
|
@ -263,7 +263,7 @@ namespace SparkleLib {
|
||||||
Process.StartInfo.WorkingDirectory = LocalPath;
|
Process.StartInfo.WorkingDirectory = LocalPath;
|
||||||
|
|
||||||
RemoteName = Path.GetFileNameWithoutExtension (RemoteOriginUrl);
|
RemoteName = Path.GetFileNameWithoutExtension (RemoteOriginUrl);
|
||||||
RemoteOriginUrl = GetRemoteOriginUrl ();
|
RemoteOriginUrl = Config ["remote.origin.url"];
|
||||||
Domain = GetDomain (RemoteOriginUrl);
|
Domain = GetDomain (RemoteOriginUrl);
|
||||||
Description = GetDescription ();
|
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
|
// Returns a list of latest commits
|
||||||
public List <SparkleCommit> GetCommits (int count) // TODO: Port to HashSet because it is quicker
|
public List <SparkleCommit> GetCommits (int count) // TODO: Port to HashSet because it is quicker
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue