From d3b1e34c7428fbe4ef3abeee9eaef0f885c3f19b Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 14 Apr 2014 12:31:56 -0400 Subject: [PATCH] Merged #47 "Fix diffstat display for tickets with pending submodule changes" --- src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java | 39 +++++++++++++++++++++++++-------------- 1 files changed, 25 insertions(+), 14 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 6662a32..a66c9b4 100644 --- a/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java +++ b/src/main/java/com/gitblit/transport/ssh/commands/BaseCommand.java @@ -1,17 +1,19 @@ -// Copyright (C) 2009 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +/* + * Copyright (C) 2009 The Android Open Source Project + * Copyright 2014 gitblit.com. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.gitblit.transport.ssh.commands; import java.io.BufferedWriter; @@ -222,6 +224,11 @@ msg.write(" "); clp.printSingleLineUsage(msg, null); msg.write("\n\n"); + String txt = getUsageText(); + if (!StringUtils.isEmpty(txt)) { + msg.write(txt); + msg.write("\n\n"); + } msg.write("ARGUMENTS & OPTIONS\n"); msg.write("───────────────────\n"); clp.printUsage(msg, null); @@ -254,6 +261,10 @@ return ""; } + protected String getUsageText() { + return ""; + } + protected String examples(UsageExample... examples) { int sshPort = getContext().getGitblit().getSettings().getInteger(Keys.git.sshPort, 29418); String username = getContext().getClient().getUsername(); -- Gitblit v1.9.1