Adds the switch parser to the given subparsers object.
(subparsers, _)
| 11 | |
| 12 | |
| 13 | def parser(subparsers, _): |
| 14 | """Adds the switch parser to the given subparsers object.""" |
| 15 | desc = 'switch branches' |
| 16 | switch_parser = subparsers.add_parser( |
| 17 | 'switch', help=desc, description=desc.capitalize()) |
| 18 | switch_parser.add_argument('branch', help='switch to branch') |
| 19 | switch_parser.add_argument( |
| 20 | '-mo', '--move-over', |
| 21 | help='move uncomitted changes made in the current branch to the ' |
| 22 | 'destination branch', |
| 23 | action='store_true') |
| 24 | switch_parser.set_defaults(func=main) |
| 25 | |
| 26 | |
| 27 | def main(args, repo): |
nothing calls this directly
no outgoing calls
no test coverage detected