MCPcopy Create free account
hub / github.com/gitless-vcs/gitless / parser

Function parser

gitless/cli/gl_switch.py:13–24  ·  view source on GitHub ↗

Adds the switch parser to the given subparsers object.

(subparsers, _)

Source from the content-addressed store, hash-verified

11
12
13def 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
27def main(args, repo):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected