Get correct working directories for 'git' subprocesses

This commit is contained in:
Alex Hudson 2010-08-02 21:19:22 +01:00
parent 89f5d77cd1
commit c9c5c6118d

View file

@ -470,6 +470,7 @@ namespace SparkleShare {
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.FileName = "git";
process.StartInfo.WorkingDirectory = LocalPath;
process.StartInfo.Arguments = "rev-list --max-count=1 HEAD";
process.Start ();
@ -490,6 +491,7 @@ namespace SparkleShare {
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.FileName = "git";
process.StartInfo.WorkingDirectory = LocalPath;
process.StartInfo.Arguments = "config --get user.name";
process.Start ();
@ -521,6 +523,7 @@ namespace SparkleShare {
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.FileName = "git";
process.StartInfo.WorkingDirectory = LocalPath;
process.StartInfo.Arguments = "config --get user.email";
process.Start ();
user_email = process.StandardOutput.ReadToEnd ().Trim ();
@ -540,6 +543,7 @@ namespace SparkleShare {
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.FileName = "git";
process.StartInfo.WorkingDirectory = LocalPath;
process.StartInfo.Arguments = "config --get remote.origin.url";
process.Start ();