summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-03-21 12:40:23 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-10 18:58:09 -0400
commit355901d24dd400ca17a7eb8f688ba9c2e15f23ba (patch)
tree92099d8bbd49fe68cc9e045a730bdfff94116860 /src
parent30d47d4f203231c80ffefea1cf10187b841b6110 (diff)
downloadgitblit-355901d24dd400ca17a7eb8f688ba9c2e15f23ba.tar.gz
gitblit-355901d24dd400ca17a7eb8f688ba9c2e15f23ba.zip
Allow command classes to manually display usage
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java5
1 files changed, 5 insertions, 0 deletions
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;