Adjust repository search to handle foo.git and foo/bar.git (issue-104)
| | |
| | |
|
| | | #### fixes
|
| | |
|
| | | - Adjust repository search to handle foo.git and foo/bar.git (issue 104)
|
| | | - Fixed bug where a repository set as authenticated push did not have anonymous clone access (issue 96)
|
| | | - Fixed bug in Basic authentication if passwords had a colon (Github/peterloron)
|
| | | - Fixed bug where the Gitblit Manager could not update a setting that was not referenced in reference.properties (issue 85)
|
| | |
| | | if (onlyBare && gitDir.getName().equals(".git")) {
|
| | | continue;
|
| | | }
|
| | | if (gitDir.equals(file) || gitDir.getParentFile().equals(file)) {
|
| | | // determine repository name relative to base path
|
| | | String repository = FileUtils.getRelativePath(baseFile, file);
|
| | | list.add(repository);
|
| | |
| | | // look for repositories in subfolders
|
| | | list.addAll(getRepositoryList(basePath, file, onlyBare, searchSubfolders));
|
| | | }
|
| | | } else if (searchSubfolders && file.canRead()) {
|
| | | // look for repositories in subfolders
|
| | | list.addAll(getRepositoryList(basePath, file, onlyBare, searchSubfolders));
|
| | | }
|
| | | }
|
| | | }
|
| | | return list;
|
| | |
| | | assertEquals(0, list.size());
|
| | | list.addAll(JGitUtils.getRepositoryList(new File("DoesNotExist"), true, true));
|
| | | assertEquals(0, list.size());
|
| | | list.addAll(JGitUtils.getRepositoryList(GitBlitSuite.REPOSITORIES, true, true));
|
| | | list.addAll(JGitUtils.getRepositoryList(GitBlitSuite.REPOSITORIES, false, true));
|
| | | assertTrue("No repositories found in " + GitBlitSuite.REPOSITORIES, list.size() > 0);
|
| | | }
|
| | |
|