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

Function parser

gitless/cli/gl_checkout.py:15–27  ·  view source on GitHub ↗

Adds the checkout parser to the given subparsers object.

(subparsers, repo)

Source from the content-addressed store, hash-verified

13
14
15def parser(subparsers, repo):
16 """Adds the checkout parser to the given subparsers object."""
17 desc = 'checkout committed versions of files'
18 checkout_parser = subparsers.add_parser(
19 'checkout', help=desc, description=desc.capitalize())
20 checkout_parser.add_argument(
21 '-cp', '--commit-point', help=(
22 'the commit point to checkout the files at. Defaults to HEAD.'),
23 dest='cp', default='HEAD')
24 checkout_parser.add_argument(
25 'files', nargs='+', help='the file(s) to checkout',
26 action=helpers.PathProcessor, repo=repo, recursive=False)
27 checkout_parser.set_defaults(func=main)
28
29
30def main(args, repo):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected