From: James Moger Date: Fri, 21 Mar 2014 16:40:23 +0000 (-0400) Subject: Allow command classes to manually display usage X-Git-Tag: v1.5.0~68^2~47 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=355901d24dd400ca17a7eb8f688ba9c2e15f23ba;p=gitblit.git Allow command classes to manually display usage --- diff --git a/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java b/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java index c4d6a57e..6a190df6 100644 --- a/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java +++ b/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java @@ -216,6 +216,11 @@ public abstract class BaseCommand implements Command, SessionAware { return ""; } + protected void showHelp() throws UnloggedFailure { + argv = new String [] { "--help" }; + parseCommandLine(); + } + private final class TaskThunk implements CancelableRunnable { private final CommandRunnable thunk; private final String taskName;