init: merge subcmd & wrapper parsers
These are manually kept in sync which is a pain. Have the init subcmd reuse the wrapper code directly. Change-Id: Ica73211422c64377bacc9bb3b1d1a8d9d5f7f4ca Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/302762 Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
6a2f4fb390
commit
9a734a3975
3 changed files with 6 additions and 109 deletions
5
repo
5
repo
|
@ -275,7 +275,12 @@ def GetParser(gitc_init=False):
|
|||
usage = 'repo init [options] [-u] url'
|
||||
|
||||
parser = optparse.OptionParser(usage=usage)
|
||||
InitParser(parser, gitc_init=gitc_init)
|
||||
return parser
|
||||
|
||||
|
||||
def InitParser(parser, gitc_init=False):
|
||||
"""Setup the CLI parser."""
|
||||
# Logging.
|
||||
group = parser.add_option_group('Logging options')
|
||||
group.add_option('-v', '--verbose',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue