From d65f712ea3d8941f4b9145c0630c30c20af80d13 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 11 Nov 2011 17:22:21 -0500
Subject: [PATCH] Documentation. Add javadoc and source jars to the gbapi download.

---
 src/com/gitblit/utils/JGitUtils.java |   25 ++-----------------------
 1 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index bfbc624..c61b3d9 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -299,7 +299,7 @@
 		}
 		list.addAll(getRepositoryList(repositoriesFolder.getAbsolutePath(), repositoriesFolder,
 				exportAll, searchSubfolders));
-		Collections.sort(list);
+		StringUtils.sortRepositorynames(list);
 		return list;
 	}
 
@@ -925,27 +925,6 @@
 	}
 
 	/**
-	 * 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
 	 * COMMIT. Results may be paginated using offset and maxCount. If the
@@ -963,7 +942,7 @@
 	 * @return matching list of commits
 	 */
 	public static List<RevCommit> 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<RevCommit> list = new ArrayList<RevCommit>();
 		if (maxCount == 0) {

--
Gitblit v1.9.1