From c9c5c6118d01a890ca86450ae632476eac6f6413 Mon Sep 17 00:00:00 2001 From: Alex Hudson Date: Mon, 2 Aug 2010 21:19:22 +0100 Subject: [PATCH] Get correct working directories for 'git' subprocesses --- SparkleShare/SparkleRepo.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SparkleShare/SparkleRepo.cs b/SparkleShare/SparkleRepo.cs index a9c87391..e22c5730 100644 --- a/SparkleShare/SparkleRepo.cs +++ b/SparkleShare/SparkleRepo.cs @@ -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 ();