From 33d8d8b21c5586f1328c8c3e7f6049037ae5fd0d Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 4 Nov 2011 17:21:30 -0400 Subject: Moved SearchType enum to Constants --- src/com/gitblit/utils/JGitUtils.java | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/com/gitblit/utils/JGitUtils.java') diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java index 80147d46..c61b3d9f 100644 --- a/src/com/gitblit/utils/JGitUtils.java +++ b/src/com/gitblit/utils/JGitUtils.java @@ -924,27 +924,6 @@ public class JGitUtils { return list; } - /** - * Enumeration of the search types. - */ - public static enum SearchType { - AUTHOR, COMMITTER, COMMIT; - - public static SearchType forName(String name) { - for (SearchType type : values()) { - if (type.name().equalsIgnoreCase(name)) { - return type; - } - } - return COMMIT; - } - - @Override - public String toString() { - return name().toLowerCase(); - } - } - /** * Search the commit history for a case-insensitive match to the value. * Search results require a specified SearchType of AUTHOR, COMMITTER, or @@ -963,7 +942,7 @@ public class JGitUtils { * @return matching list of commits */ public static List searchRevlogs(Repository repository, String objectId, - String value, final SearchType type, int offset, int maxCount) { + String value, final com.gitblit.Constants.SearchType type, int offset, int maxCount) { final String lcValue = value.toLowerCase(); List list = new ArrayList(); if (maxCount == 0) { -- cgit v1.2.3