mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
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>
This commit is contained in:
@@ -367,7 +367,7 @@ later is required to fix a server side protocol bug.
|
||||
|
||||
jobs = opt.jobs_network if opt.jobs_network else self.jobs
|
||||
fetched = set()
|
||||
pm = Progress('Fetching', len(projects), delay=False)
|
||||
pm = Progress('Fetching', len(projects), delay=False, quiet=opt.quiet)
|
||||
|
||||
objdir_project_map = dict()
|
||||
for project in projects:
|
||||
@@ -470,7 +470,7 @@ later is required to fix a server side protocol bug.
|
||||
# Only checkout projects with worktrees.
|
||||
all_projects = [x for x in all_projects if x.worktree]
|
||||
|
||||
pm = Progress('Checking out', len(all_projects))
|
||||
pm = Progress('Checking out', len(all_projects), quiet=opt.quiet)
|
||||
|
||||
def _ProcessResults(results):
|
||||
for (success, project, start, finish) in results:
|
||||
@@ -504,7 +504,7 @@ later is required to fix a server side protocol bug.
|
||||
return ret and not err_results
|
||||
|
||||
def _GCProjects(self, projects, opt, err_event):
|
||||
pm = Progress('Garbage collecting', len(projects), delay=False)
|
||||
pm = Progress('Garbage collecting', len(projects), delay=False, quiet=opt.quiet)
|
||||
pm.update(inc=0, msg='prescan')
|
||||
|
||||
gc_gitdirs = {}
|
||||
|
||||
Reference in New Issue
Block a user