repo git: add more git-bin configuration on startup

This commit is contained in:
Hylke Bons 2012-12-18 13:36:36 +01:00
parent 2cb48ba745
commit 6daf9fd31c

View file

@ -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<string> ExcludePaths {
get {
List<string> rules = new List<string> ();