]> git.ipfire.org Git - thirdparty/git.git/commit - git-p4.py
git-p4: show detailed help when parsing options fail
authorBen Keene <seraphire@gmail.com>
Mon, 16 Dec 2019 14:02:20 +0000 (14:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Dec 2019 20:32:13 +0000 (12:32 -0800)
commit608e380502f754b50ead6c7e6c3f5ff5ee8eca33
tree766efdaac3ea7e8a0c4292a3d53c04c9c2606727
parente2aed5fd5bfb0381a6f69373c01ef09d70467a5c
git-p4: show detailed help when parsing options fail

When a user provides invalid parameters to git-p4, the program
reports the failure but does not provide the correct command syntax.

Add an exception handler to the command-line argument parser to display
the command's specific command line parameter syntax when an exception
is thrown. Rethrow the exception so the current behavior is retained.

Signed-off-by: Ben Keene <seraphire@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py