git fetcher: Actually trigger progress event

This commit is contained in:
Hylke Bons 2016-06-30 09:55:34 +01:00
parent a9cd7c825d
commit d40c2c12a0

View file

@ -106,7 +106,6 @@ namespace Sparkles.Git {
if (FetchedRepoStorageType == StorageType.LargeFiles)
output_stream = git_clone.StandardOutput;
double previous_percentage = 0;
double percentage = 0;
double speed = 0;
string information = "";
@ -114,7 +113,6 @@ namespace Sparkles.Git {
while (!output_stream.EndOfStream) {
string line = output_stream.ReadLine ();
previous_percentage = percentage;
ErrorStatus error = GitCommand.ParseProgress (line, out percentage, out speed, out information);
if (error != ErrorStatus.None) {
@ -125,8 +123,7 @@ namespace Sparkles.Git {
return false;
}
if (percentage <= previous_percentage)
continue;
OnProgressChanged (percentage, speed, information);
}
git_clone.WaitForExit ();