Added the GIT_SSH environment variable and set it to "ssh" so that git will use ssh-agent; fixed a bug where SparkleShare creates an exclude file within the "info" directory without checking if the "info" directory exists.

This commit is contained in:
Beau Gunderson 2011-09-14 12:19:53 -07:00
parent d66656da08
commit 1e9d6b752c
2 changed files with 16 additions and 2 deletions

View file

@ -138,10 +138,22 @@ namespace SparkleLib {
// Add a .gitignore file to the repo
private void InstallExcludeRules ()
{
string exlude_rules_file_path = SparkleHelpers.CombineMore (
string exclude_rules_file_path = SparkleHelpers.CombineMore (
this.target_folder, ".git", "info", "exclude");
TextWriter writer = new StreamWriter (exlude_rules_file_path);
string directory = Path.GetDirectoryName(exclude_rules_file_path);
if (directory == null)
{
return;
}
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory);
}
TextWriter writer = new StreamWriter (exclude_rules_file_path);
// gedit and emacs
writer.WriteLine ("*~");

View file

@ -58,8 +58,10 @@ namespace SparkleShare {
+ MSysGit + @"\mingw\bin" + ";"
+ MSysGit + @"\cmd" + ";"
+ System.Environment.ExpandEnvironmentVariables ("%PATH%");
System.Environment.SetEnvironmentVariable ("PATH", newPath);
System.Environment.SetEnvironmentVariable ("PLINK_PROTOCOL", "ssh");
System.Environment.SetEnvironmentVariable ("GIT_SSH", "ssh");
if (String.IsNullOrEmpty (System.Environment.GetEnvironmentVariable ("HOME")))
System.Environment.SetEnvironmentVariable ("HOME", Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%"));