summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/utils
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-05-19 17:13:50 -0400
committerJames Moger <james.moger@gitblit.com>2011-05-19 17:13:50 -0400
commit00afd77a2182ece3d9522d41b86b4ddd7e132288 (patch)
treedbff3de74c43d4bdb7c31f6c0acb83cd8045a631 /src/com/gitblit/utils
parentdd7961bc443c732d0bbdd6bda47d6c2cfda5b290 (diff)
downloadgitblit-00afd77a2182ece3d9522d41b86b4ddd7e132288.tar.gz
gitblit-00afd77a2182ece3d9522d41b86b4ddd7e132288.zip
Owner editing. Frozen status. Grouped repositories. Documentation.
Diffstat (limited to 'src/com/gitblit/utils')
-rw-r--r--src/com/gitblit/utils/StringUtils.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java
index ff47a51e..8b7960b3 100644
--- a/src/com/gitblit/utils/StringUtils.java
+++ b/src/com/gitblit/utils/StringUtils.java
@@ -107,4 +107,11 @@ public class StringUtils {
throw new RuntimeException(t);
}
}
+
+ public static String getRootPath(String path) {
+ if (path.indexOf('/') > -1) {
+ return path.substring(0, path.indexOf('/'));
+ }
+ return "";
+ }
}