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/init.py b/subcmds/init.py
index a23e529..4182262 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -79,6 +79,9 @@
to update the working directory files.
"""
+ def _CommonOptions(self, p):
+ """Disable due to re-use of Wrapper()."""
+
def _Options(self, p, gitc_init=False):
Wrapper().InitParser(p, gitc_init=gitc_init)
@@ -436,9 +439,6 @@
% ('.'.join(str(x) for x in MIN_GIT_VERSION_SOFT),),
file=sys.stderr)
- opt.quiet = opt.output_mode is False
- opt.verbose = opt.output_mode is True
-
rp = self.manifest.repoProject
# Handle new --repo-url requests.