diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 6d16e8e1..d8853796 100755 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -169,7 +169,7 @@ namespace SparkleLib { public override bool CheckForRemoteChanges () { SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Checking for remote changes..."); - SparkleGit git = new SparkleGit (LocalPath, "ls-remote origin master"); + SparkleGit git = new SparkleGit (LocalPath, "ls-remote " + Url + " master"); git.Start (); git.WaitForExit (); @@ -201,7 +201,7 @@ namespace SparkleLib { SparkleGit git = new SparkleGit (LocalPath, "push --progress " + // Redirects progress stats to standarderror - "origin master"); + Url + " master"); git.StartInfo.RedirectStandardError = true; git.Start (); @@ -258,7 +258,7 @@ namespace SparkleLib { public override bool SyncDown () { - SparkleGit git = new SparkleGit (LocalPath, "fetch --progress"); + SparkleGit git = new SparkleGit (LocalPath, "fetch --progress " + Url); git.StartInfo.RedirectStandardError = true; git.Start (); diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index 74f367af..9c626092 100755 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -60,6 +60,7 @@ namespace SparkleLib { public readonly SparkleBackend Backend; public readonly string LocalPath; public readonly string Name; + public readonly Uri Url; public abstract bool AnyDifferences { get; } public abstract string Identifier { get; } @@ -94,8 +95,10 @@ namespace SparkleLib { public SparkleRepoBase (string path, SparkleBackend backend) { - LocalPath = path; - Name = Path.GetFileName (LocalPath); + LocalPath = path; + Name = Path.GetFileName (LocalPath); + Url = new Uri (SparkleConfig.DefaultConfig.GetUrlForFolder (Name)); + Backend = backend; this.poll_interval = this.short_interval;