diff --git a/src/pull.rs b/src/pull.rs index 64846ae..3db2d64 100644 --- a/src/pull.rs +++ b/src/pull.rs @@ -28,6 +28,7 @@ fn clone_repo( let mut callbacks = git2::RemoteCallbacks::new(); if let Some(ref progress_cb) = progress { + // Download progress callbacks.transfer_progress(move |stats| { (progress_cb)( "", @@ -37,6 +38,9 @@ fn clone_repo( ); true }); + + // Remote progress: messages 'Remote: compressing objects 10% (34/340)' + // Parse progress informations to display them in callbacks callbacks.sideband_progress(move |data| { let msg = String::from_utf8_lossy(data); let re = Regex::new(r"(.*):[ ]*([0-9]*)% \(([0-9]*)/([0-9]*)\)").unwrap();