From 151701e85f0beb1a7c896eb82c0d1f55ee380567 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 13 Apr 2021 15:07:21 -0400 Subject: progress: hide progress bar when --quiet We want progress bars in the default output mode, but not when the user specifies --quiet. Add a setting to the Progress bar class so it takes care of not displaying anything itself rather than having to update every subcommand to conditionally setup & call the object. Change-Id: I1134993bffc5437bc22e26be11a512125f10597f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/303225 Reviewed-by: Raman Tenneti Tested-by: Mike Frysinger --- subcmds/checkout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subcmds/checkout.py') diff --git a/subcmds/checkout.py b/subcmds/checkout.py index cf54ced7..6b71a8fa 100644 --- a/subcmds/checkout.py +++ b/subcmds/checkout.py @@ -59,7 +59,7 @@ The command is equivalent to: err.append(project) pm.update() - pm = Progress('Checkout %s' % nb, len(all_projects)) + pm = Progress('Checkout %s' % nb, len(all_projects), quiet=opt.quiet) # NB: Multiprocessing is heavy, so don't spin it up for one job. if len(all_projects) == 1 or opt.jobs == 1: _ProcessResults(self._ExecuteOne(nb, x) for x in all_projects) -- cgit v1.2.3-54-g00ecf