Give git the local working directory before looking for information.
This commit is contained in:
parent
570414c495
commit
ce1674dcfd
|
@ -71,6 +71,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
LocalPath = path;
|
LocalPath = path;
|
||||||
Name = Path.GetFileName (LocalPath);
|
Name = Path.GetFileName (LocalPath);
|
||||||
|
System.Console.WriteLine("New repo in {0}", LocalPath);
|
||||||
|
|
||||||
Process = new Process () {
|
Process = new Process () {
|
||||||
EnableRaisingEvents = true
|
EnableRaisingEvents = true
|
||||||
|
@ -470,6 +471,7 @@ namespace SparkleShare {
|
||||||
process.StartInfo.RedirectStandardOutput = true;
|
process.StartInfo.RedirectStandardOutput = true;
|
||||||
process.StartInfo.UseShellExecute = false;
|
process.StartInfo.UseShellExecute = false;
|
||||||
process.StartInfo.FileName = "git";
|
process.StartInfo.FileName = "git";
|
||||||
|
process.StartInfo.WorkingDirectory = LocalPath;
|
||||||
process.StartInfo.Arguments = "rev-list --max-count=1 HEAD";
|
process.StartInfo.Arguments = "rev-list --max-count=1 HEAD";
|
||||||
process.Start ();
|
process.Start ();
|
||||||
|
|
||||||
|
@ -490,6 +492,7 @@ namespace SparkleShare {
|
||||||
process.StartInfo.RedirectStandardOutput = true;
|
process.StartInfo.RedirectStandardOutput = true;
|
||||||
process.StartInfo.UseShellExecute = false;
|
process.StartInfo.UseShellExecute = false;
|
||||||
process.StartInfo.FileName = "git";
|
process.StartInfo.FileName = "git";
|
||||||
|
process.StartInfo.WorkingDirectory = LocalPath;
|
||||||
process.StartInfo.Arguments = "config --get user.name";
|
process.StartInfo.Arguments = "config --get user.name";
|
||||||
process.Start ();
|
process.Start ();
|
||||||
|
|
||||||
|
@ -521,6 +524,7 @@ namespace SparkleShare {
|
||||||
process.StartInfo.UseShellExecute = false;
|
process.StartInfo.UseShellExecute = false;
|
||||||
process.StartInfo.RedirectStandardOutput = true;
|
process.StartInfo.RedirectStandardOutput = true;
|
||||||
process.StartInfo.FileName = "git";
|
process.StartInfo.FileName = "git";
|
||||||
|
process.StartInfo.WorkingDirectory = LocalPath;
|
||||||
process.StartInfo.Arguments = "config --get user.email";
|
process.StartInfo.Arguments = "config --get user.email";
|
||||||
process.Start ();
|
process.Start ();
|
||||||
user_email = process.StandardOutput.ReadToEnd ().Trim ();
|
user_email = process.StandardOutput.ReadToEnd ().Trim ();
|
||||||
|
@ -540,6 +544,7 @@ namespace SparkleShare {
|
||||||
process.StartInfo.UseShellExecute = false;
|
process.StartInfo.UseShellExecute = false;
|
||||||
process.StartInfo.RedirectStandardOutput = true;
|
process.StartInfo.RedirectStandardOutput = true;
|
||||||
process.StartInfo.FileName = "git";
|
process.StartInfo.FileName = "git";
|
||||||
|
process.StartInfo.WorkingDirectory = LocalPath;
|
||||||
process.StartInfo.Arguments = "config --get remote.origin.url";
|
process.StartInfo.Arguments = "config --get remote.origin.url";
|
||||||
process.Start ();
|
process.Start ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue