main: register --help-commands on the main parser
commitfb210c07805e9c0b3f7fec0370ac36396070a9b7
authorDavid Aguilar <davvid@gmail.com>
Sun, 25 Apr 2021 20:43:03 +0000 (25 13:43 -0700)
committerDavid Aguilar <davvid@gmail.com>
Sun, 25 Apr 2021 20:45:51 +0000 (25 13:45 -0700)
tree9a844c95ebf4022bf4dbc4e35cc838b03d333237
parent6cdbbf1277f628d0362b739a107cef9ed037259b
main: register --help-commands on the main parser

Newer version of argparse on Pyhton 3.8 (and possibly earlier)
require us to register --help-commands on the main parser otherwise
an error message is reported when running "git cola --help-commands".

Add a new add_help_options() helper function and use it to register
the "--help-commands" flag on both the main parser and the cola
sub-parser.

Closes #1133
Reported-by: Fang Pengfei <pffang@vip.qq.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
CHANGES.rst
cola/main.py