check for changes before merging, but reading output doesn't work
This commit is contained in:
parent
78dfda62e0
commit
9048474c02
|
@ -223,11 +223,13 @@ namespace SparkleShare {
|
||||||
FetchTimer.Stop ();
|
FetchTimer.Stop ();
|
||||||
// SparkleUI.NotificationIcon.SetSyncingState ();
|
// SparkleUI.NotificationIcon.SetSyncingState ();
|
||||||
Console.WriteLine ("[Git][" + Name + "] Fetching changes... ");
|
Console.WriteLine ("[Git][" + Name + "] Fetching changes... ");
|
||||||
Process.StartInfo.Arguments = "fetch -v"; // TODO: Only call merge when there are changes
|
Process.StartInfo.Arguments = "fetch -v";
|
||||||
Process.Start();
|
Process.Start();
|
||||||
|
string Output = Process.StandardOutput.ReadToEnd().Trim (); // TODO: This doesn't work :(
|
||||||
Process.WaitForExit ();
|
Process.WaitForExit ();
|
||||||
Console.WriteLine ("[Git][" + Name + "] Changes fetched.");
|
Console.WriteLine ("[Git][" + Name + "] Changes fetched.");
|
||||||
Merge ();
|
if (!Output.Contains ("up to date"))
|
||||||
|
Merge ();
|
||||||
// SparkleUI.NotificationIcon.SetIdleState ();
|
// SparkleUI.NotificationIcon.SetIdleState ();
|
||||||
FetchTimer.Start ();
|
FetchTimer.Start ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue