Adds the init parser to the given subparsers object.
(subparsers, _)
| 15 | |
| 16 | |
| 17 | def parser(subparsers, _): |
| 18 | """Adds the init parser to the given subparsers object.""" |
| 19 | desc = ( |
| 20 | 'create an empty git repository or clone remote') |
| 21 | init_parser = subparsers.add_parser( |
| 22 | 'init', help=desc, description=desc.capitalize()) |
| 23 | init_parser.add_argument( |
| 24 | 'repo', nargs='?', |
| 25 | help=( |
| 26 | 'an optional remote repo address from where to read to create the ' |
| 27 | 'local repo')) |
| 28 | init_parser.set_defaults(func=main) |
| 29 | |
| 30 | |
| 31 | def main(args, repo): |
nothing calls this directly
no outgoing calls
no test coverage detected