mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-26 20:17:52 +00:00
subcmds: centralize all_commands logic
The branch->branches alias is setup in the main module when that really belongs in the existing all_commands setup. For help, rather than monkey patching all_commands to the class, switch it to use the state directly from the module. This makes it a bit more obvious where it's coming from rather than this one subcommand having a |commands| member added externally to it. Change-Id: I0200def09bf4774cad8012af0f4ae60ea3089dc0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/259153 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
This commit is contained in:
committed by
David Pursehouse
parent
f725e548db
commit
d3639c53d5
2
main.py
2
main.py
@ -135,8 +135,6 @@ class _Repo(object):
|
||||
def __init__(self, repodir):
|
||||
self.repodir = repodir
|
||||
self.commands = all_commands
|
||||
# add 'branch' as an alias for 'branches'
|
||||
all_commands['branch'] = all_commands['branches']
|
||||
|
||||
def _ParseArgs(self, argv):
|
||||
"""Parse the main `repo` command line options."""
|
||||
|
Reference in New Issue
Block a user