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

Function parser

gitless/cli/file_cmd.py:16–28  ·  view source on GitHub ↗
(help_msg, subcmd)

Source from the content-addressed store, hash-verified

14
15
16def parser(help_msg, subcmd):
17 def f(subparsers, repo):
18 p = subparsers.add_parser(
19 subcmd, help=help_msg, description=help_msg.capitalize())
20 p.add_argument(
21 'files', nargs='+', help='the file(s) to {0}'.format(subcmd),
22 action=helpers.PathProcessor, repo=repo,
23 skip_dir_test=repo and repo.current_branch.path_is_ignored,
24 skip_dir_cb=lambda path: pprint.warn(
25 'Skipped files under directory {0} since they are all '
26 'ignored'.format(path)))
27 p.set_defaults(func=main(subcmd))
28 return f
29
30
31def main(subcmd):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected