]> source.dussan.org Git - gitblit.git/commitdiff
Allow command classes to manually display usage
authorJames Moger <james.moger@gitblit.com>
Fri, 21 Mar 2014 16:40:23 +0000 (12:40 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 10 Apr 2014 22:58:09 +0000 (18:58 -0400)
src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java

index c4d6a57eaa14173057e6b9ca0b1401feed865b8c..6a190df6a9745aea4184ed43d2361204bd28decc 100644 (file)
@@ -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;