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:
parent
d66656da08
commit
1e9d6b752c
|
@ -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 ("*~");
|
||||
|
|
|
@ -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%"));
|
||||
|
|
Loading…
Reference in a new issue