From 7baf2e4cd2ef8082b74937e26de75b01e630b5d4 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 17 Apr 2014 12:00:35 -0400
Subject: [PATCH] Expose JGit 3.x receive pack settings as Gitblit settings

---
 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