diff options
author | Mike Frysinger <vapier@google.com> | 2021-04-13 15:07:21 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2021-04-13 22:25:26 +0000 |
commit | 151701e85f0beb1a7c896eb82c0d1f55ee380567 (patch) | |
tree | 7e86c0ff2835050abf73b62bac69390dfb67b8a6 /subcmds/checkout.py | |
parent | 9180a07b8fb33d5ba0b82facf987b51ca7b15dc4 (diff) | |
download | git-repo-151701e85f0beb1a7c896eb82c0d1f55ee380567.tar.gz |
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 <rtenneti@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/checkout.py')
-rw-r--r-- | subcmds/checkout.py | 2 |
1 files changed, 1 insertions, 1 deletions
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: | |||
59 | err.append(project) | 59 | err.append(project) |
60 | pm.update() | 60 | pm.update() |
61 | 61 | ||
62 | pm = Progress('Checkout %s' % nb, len(all_projects)) | 62 | pm = Progress('Checkout %s' % nb, len(all_projects), quiet=opt.quiet) |
63 | # NB: Multiprocessing is heavy, so don't spin it up for one job. | 63 | # NB: Multiprocessing is heavy, so don't spin it up for one job. |
64 | if len(all_projects) == 1 or opt.jobs == 1: | 64 | if len(all_projects) == 1 or opt.jobs == 1: |
65 | _ProcessResults(self._ExecuteOne(nb, x) for x in all_projects) | 65 | _ProcessResults(self._ExecuteOne(nb, x) for x in all_projects) |