git ssb

0+

cel / pull-git-remote-helper



Commit 1c27109b9155b4dd90f5068566dfc45b92a17f82

Ensure progress bar doesn't interfere with debug output

Charles Lehner committed on 2/19/2016, 7:26:55 PM
Parent: 61ec87e541fec1873ca242b614d0c4be2ad6385e

Files changed

index.jschanged
index.jsView
@@ -147,9 +147,15 @@
147147 }
148148
149149 // through stream to show a progress bar for objects being read
150150 function progressObjects(options) {
151- if (!options.progress) return function (readObject) { return readObject }
151+ // Only show progress bar if it is requested and if it won't interfere with
152+ // the debug output
153+ if (!options.progress || options.verbosity > 1) {
154+ var dummyProgress = function (readObject) { return readObject }
155+ dummyProgress.setNumObjects = function () {}
156+ return dummyProgress
157+ }
152158
153159 var numObjects
154160 var size = process.stderr.columns - 5
155161 var bar = new ProgressBar(':percent :bar', { total: size })

Built with git-ssb-web