command: make --verbose/--quiet available to all subcommands
Add new CommonOptions entry points to move the existing --jobs to,
and relocate all --verbose/--quiet options to that. This provides
both a consistent interface for users as well as for code.
Change-Id: Ifaf83b88872421f4749b073c472b4a67ca6c0437
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/303224
Reviewed-by: Raman Tenneti <rtenneti@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
diff --git a/subcmds/grep.py b/subcmds/grep.py
index 49feaf6..9a4a8a3 100644
--- a/subcmds/grep.py
+++ b/subcmds/grep.py
@@ -82,8 +82,11 @@
if value is not None:
pt.append(value)
+ def _CommonOptions(self, p):
+ """Override common options slightly."""
+ super()._CommonOptions(p, opt_v=False)
+
def _Options(self, p):
- super()._Options(p)
g = p.add_option_group('Sources')
g.add_option('--cached',
action='callback', callback=self._carry_option,