diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 9e5fe347..5ca11548 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -81,13 +81,8 @@ namespace SparkleLib.Git { this.use_git_bin = (git.ExitCode == 0); - if (this.use_git_bin) { - git = new SparkleGit (LocalPath, "config git-bin.sshUrl \"" + RemoteUrl + "\""); - git.StartAndWaitForExit (); - - git = new SparkleGit (LocalPath, "config git-bin.sshPrivateKeyFile \"" + config.User.PrivateKeyFilePath + "\""); - git.StartAndWaitForExit (); - } + if (this.use_git_bin) + ConfigureGitBin (); git = new SparkleGit (LocalPath, "config remote.origin.url \"" + RemoteUrl + "\""); git.StartAndWaitForExit (); @@ -99,6 +94,22 @@ namespace SparkleLib.Git { } + private void ConfigureGitBin () + { + SparkleGit git = new SparkleGit (LocalPath, "config filter.bin.clean \"git bin clean %f\""); + git.StartAndWaitForExit (); + + git = new SparkleGit (LocalPath, "config filter.bin.smudge \"git bin smudge\""); + git.StartAndWaitForExit (); + + git = new SparkleGit (LocalPath, "config git-bin.sshUrl \"" + RemoteUrl + "\""); + git.StartAndWaitForExit (); + + git = new SparkleGit (LocalPath, "config git-bin.sshPrivateKeyFile \"" + config.User.PrivateKeyFilePath + "\""); + git.StartAndWaitForExit (); + } + + public override List ExcludePaths { get { List rules = new List ();