]> source.dussan.org Git - jgit.git/commit
branch command: print help if requested, even if arguments are wrong 29/63429/5
authorAndrey Loskutov <loskutov@gmx.de>
Sun, 3 Jan 2016 15:15:34 +0000 (16:15 +0100)
committerAndrey Loskutov <loskutov@gmx.de>
Wed, 6 Jan 2016 22:27:15 +0000 (17:27 -0500)
commitfb5056c2c5e96b815abe568af588157083c66197
tree9b23312d5405f590f26d95925e42babba59787b4
parent24468f09e3fb991ea5a6af293f84c7fe37e78b95
branch command: print help if requested, even if arguments are wrong

git branch -d -h reports an error (because of missing -d option value)
but does not print the help as expected.

To fix this, CmdLineParser must catch, print but do not propagate
exceptions if help is requested.

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