From a6dd4bb55e3be948cc7b34dc22d7f94456a019cb Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 21 Mar 2012 18:05:15 -0400
Subject: [PATCH] Corrected sample syntax for branch and path terms
---
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