]> source.dussan.org Git - jgit.git/commit
Don't treat command termination due '-h' option as a fatal error 30/63330/3
authorAndrey Loskutov <loskutov@gmx.de>
Mon, 28 Dec 2015 22:27:09 +0000 (23:27 +0100)
committerAndrey Loskutov <loskutov@gmx.de>
Tue, 29 Dec 2015 13:35:08 +0000 (14:35 +0100)
commitc59d86c0a79f913a8d6a62f2aa37dddcb1e2142c
tree0e62abd15736414c355968ac20f8a27d18fa8d1a
parent4b7839cafd3561bbeca6ed6dabce3d9039ab8288
Don't treat command termination due '-h' option as a fatal error

Signal early command termination due '-h' or '--help' option via
TerminatedByHelpException. This allows tests using
CLIGitCommand differentiate between unexpected command parsing errors
and expected command cancellation "on help" (which also allows
validation of expected/unexpected help messages).

Additional side-effect: jgit supports now git style of handling help
option: any unexpected command line options before help are reported as
errors, but after help ignored.

Bug: 484951
Change-Id: If45c41c0d32895ab6822a7ff9d851877dcef5771
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DescribeTest.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java