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

Function parser

gitless/cli/gl_history.py:16–32  ·  view source on GitHub ↗

Adds the history parser to the given subparsers object.

(subparsers, _)

Source from the content-addressed store, hash-verified

14
15
16def parser(subparsers, _):
17 """Adds the history parser to the given subparsers object."""
18 desc = 'show commit history'
19 history_parser = subparsers.add_parser(
20 'history', help=desc, description=desc.capitalize())
21 history_parser.add_argument(
22 '-v', '--verbose', help='be verbose, will output the diffs of the commit',
23 action='store_true')
24 history_parser.add_argument(
25 '-l', '--limit', help='limit number of commits displayed', type=int)
26 history_parser.add_argument(
27 '-c', '--compact', help='output history in a compact format',
28 action='store_true', default=False)
29 history_parser.add_argument(
30 '-b', '--branch', nargs='?', metavar='branch_name', dest='b',
31 help='the branch to show history of (defaults to the current branch)')
32 history_parser.set_defaults(func=main)
33
34
35def main(args, repo):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected