From 58a1e415ff0cda6884cf004766b603e3763b0ac0 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Tue, 20 Mar 2012 19:45:20 -0400 Subject: [PATCH] Added protect-refs.groovy to the GO and WAR builds --- src/com/gitblit/utils/StringUtils.java | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java index fc0bf42..adede1f 100644 --- a/src/com/gitblit/utils/StringUtils.java +++ b/src/com/gitblit/utils/StringUtils.java @@ -169,16 +169,6 @@ } /** - * Returns a trimmed shortlog message. - * - * @param string - * @return trimmed shortlog message - */ - public static String trimShortLog(String string) { - return trimString(string, 60); - } - - /** * Left pad a string with the specified character, if the string length is * less than the specified length. * @@ -495,4 +485,11 @@ } return value; } + + public static int countLines(String value) { + if (isEmpty(value)) { + return 0; + } + return value.split("\n").length; + } } \ No newline at end of file -- Gitblit v1.9.1