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 | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java
index a465e0d..adede1f 100644
--- a/src/com/gitblit/utils/StringUtils.java
+++ b/src/com/gitblit/utils/StringUtils.java
@@ -485,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