*/\r
private void addToCachedRepositoryList(RepositoryModel model) {\r
if (settings.getBoolean(Keys.git.cacheRepositoryList, true)) {\r
- repositoryListCache.put(model.name, model);\r
+ repositoryListCache.put(model.name.toLowerCase(), model);\r
\r
// update the fork origin repository with this repository clone\r
if (!StringUtils.isEmpty(model.originRepository)) {\r
if (StringUtils.isEmpty(name)) {\r
return null;\r
}\r
- return repositoryListCache.remove(name);\r
+ return repositoryListCache.remove(name.toLowerCase());\r
}\r
\r
/**\r
}\r
\r
// cached model\r
- RepositoryModel model = repositoryListCache.get(repositoryName);\r
+ RepositoryModel model = repositoryListCache.get(repositoryName.toLowerCase());\r
\r
if (gcExecutor.isCollectingGarbage(model.name)) {\r
// Gitblit is busy collecting garbage, use our cached model\r
// ensure origin still exists\r
File repoFolder = new File(getRepositoriesFolder(), originRepo);\r
if (repoFolder.exists()) {\r
- model.originRepository = originRepo;\r
+ model.originRepository = originRepo.toLowerCase();\r
}\r
}\r
} catch (URISyntaxException e) {\r
if (settings.getBoolean(Keys.git.cacheRepositoryList, true)) {\r
// if we are caching use the cache to determine availability\r
// otherwise we end up adding a phantom repository to the cache\r
- return repositoryListCache.containsKey(repositoryName);\r
+ return repositoryListCache.containsKey(repositoryName.toLowerCase());\r
} \r
Repository r = getRepository(repositoryName, false);\r
if (r == null) {\r
}\r
\r
for (String repository : repositoryListCache.keySet()) {\r
- if (repository.toLowerCase().startsWith(userPath)) {\r
+ if (repository.startsWith(userPath)) {\r
RepositoryModel model = repositoryListCache.get(repository);\r
if (!StringUtils.isEmpty(model.originRepository)) {\r
if (roots.contains(model.originRepository)) {\r
// not caching\r
ProjectModel project = getProjectModel(userProject);\r
for (String repository : project.repositories) {\r
- if (repository.toLowerCase().startsWith(userProject)) {\r
+ if (repository.startsWith(userProject)) {\r
RepositoryModel model = repositoryListCache.get(repository);\r
if (model.originRepository.equalsIgnoreCase(origin)) {\r
// user has a fork\r
public ForkModel getForkNetwork(String repository) {\r
if (settings.getBoolean(Keys.git.cacheRepositoryList, true)) {\r
// find the root\r
- RepositoryModel model = repositoryListCache.get(repository);\r
+ RepositoryModel model = repositoryListCache.get(repository.toLowerCase());\r
while (model.originRepository != null) {\r
model = repositoryListCache.get(model.originRepository);\r
}\r
}\r
\r
private ForkModel getForkModel(String repository) {\r
- RepositoryModel model = repositoryListCache.get(repository);\r
+ RepositoryModel model = repositoryListCache.get(repository.toLowerCase());\r
ForkModel fork = new ForkModel(model);\r
if (!ArrayUtils.isEmpty(model.forks)) {\r
for (String aFork : model.forks) {\r