Skip to content

Commit

Permalink
git fetcher: Actually trigger progress event
Browse files Browse the repository at this point in the history
  • Loading branch information
hbons committed Jul 8, 2016
1 parent 6cefee7 commit 3dba387
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Sparkles/Git/GitFetcher.cs
Expand Up @@ -106,15 +106,13 @@ public override bool Fetch ()
if (FetchedRepoStorageType == StorageType.LargeFiles)
output_stream = git_clone.StandardOutput;

double previous_percentage = 0;
double percentage = 0;
double speed = 0;
string information = "";

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) {
Expand All @@ -125,8 +123,7 @@ public override bool Fetch ()
return false;
}

if (percentage <= previous_percentage)
continue;
OnProgressChanged (percentage, speed, information);
}

git_clone.WaitForExit ();
Expand Down

0 comments on commit 3dba387

Please sign in to comment.