diff options
author | James Moger <james.moger@gitblit.com> | 2011-05-19 17:13:50 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-05-19 17:13:50 -0400 |
commit | 00afd77a2182ece3d9522d41b86b4ddd7e132288 (patch) | |
tree | dbff3de74c43d4bdb7c31f6c0acb83cd8045a631 /src/com/gitblit/utils | |
parent | dd7961bc443c732d0bbdd6bda47d6c2cfda5b290 (diff) | |
download | gitblit-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.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 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 "";
+ }
}
|