Adds the history parser to the given subparsers object.
(subparsers, _)
| 14 | |
| 15 | |
| 16 | def 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 | |
| 35 | def main(args, repo): |
nothing calls this directly
no outgoing calls
no test coverage detected