summaryrefslogtreecommitdiffstats
path: root/subcmds/forall.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-04-13 14:57:40 -0400
committerMike Frysinger <vapier@google.com>2021-04-13 22:25:17 +0000
commit9180a07b8fb33d5ba0b82facf987b51ca7b15dc4 (patch)
tree4c815bea7136115bf382a1bb75b89b67bd39bd61 /subcmds/forall.py
parentf32f243ff8aaabe5287235015e1ce189da0123e3 (diff)
downloadgit-repo-9180a07b8fb33d5ba0b82facf987b51ca7b15dc4.tar.gz
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>
Diffstat (limited to 'subcmds/forall.py')
-rw-r--r--subcmds/forall.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py
index f0ce97cb..4a631fb7 100644
--- a/subcmds/forall.py
+++ b/subcmds/forall.py
@@ -129,8 +129,6 @@ without iterating through the remaining projects.
129 del parser.rargs[0] 129 del parser.rargs[0]
130 130
131 def _Options(self, p): 131 def _Options(self, p):
132 super()._Options(p)
133
134 p.add_option('-r', '--regex', 132 p.add_option('-r', '--regex',
135 dest='regex', action='store_true', 133 dest='regex', action='store_true',
136 help="Execute the command only on projects matching regex or wildcard expression") 134 help="Execute the command only on projects matching regex or wildcard expression")
@@ -153,13 +151,10 @@ without iterating through the remaining projects.
153 help='Silently skip & do not exit non-zero due missing ' 151 help='Silently skip & do not exit non-zero due missing '
154 'checkouts') 152 'checkouts')
155 153
156 g = p.add_option_group('Output') 154 g = p.get_option_group('--quiet')
157 g.add_option('-p', 155 g.add_option('-p',
158 dest='project_header', action='store_true', 156 dest='project_header', action='store_true',
159 help='Show project headers before output') 157 help='Show project headers before output')
160 g.add_option('-v', '--verbose',
161 dest='verbose', action='store_true',
162 help='Show command error messages')
163 p.add_option('--interactive', 158 p.add_option('--interactive',
164 action='store_true', 159 action='store_true',
165 help='force interactive usage') 160 help='force interactive usage')