Ver código fonte

Fixed bug in create/rename repository if the root group alias is specified (issue 143)

tags/v1.2.0
James Moger 11 anos atrás
pai
commit
2c60de580f
2 arquivos alterados com 8 adições e 0 exclusões
  1. 1
    0
      docs/04_releases.mkd
  2. 7
    0
      src/com/gitblit/GitBlit.java

+ 1
- 0
docs/04_releases.mkd Ver arquivo

@@ -11,6 +11,7 @@ If you are updating from an earlier release AND you have indexed branches with t
#### fixes
- Fixed bug in create/rename repository if you explicitly specified the alias for the root group (e.g. main/myrepo) (issue 143)
- Wrapped Markdown parser with improved exception handler (issue 142)
- Fixed duplicate entries in repository cache (issue 140)
- Fixed connection leak in LDAPUserService (issue 139)

+ 7
- 0
src/com/gitblit/GitBlit.java Ver arquivo

@@ -1547,6 +1547,13 @@ public class GitBlit implements ServletContextListener {
public void updateRepositoryModel(String repositoryName, RepositoryModel repository,
boolean isCreate) throws GitBlitException {
Repository r = null;
String projectPath = StringUtils.getFirstPathElement(repository.name);
if (!StringUtils.isEmpty(projectPath)) {
if (projectPath.equalsIgnoreCase(getString(Keys.web.repositoryRootGroupName, "main"))) {
// strip leading group name
repository.name = repository.name.substring(projectPath.length() + 1);
}
}
if (isCreate) {
// ensure created repository name ends with .git
if (!repository.name.toLowerCase().endsWith(org.eclipse.jgit.lib.Constants.DOT_GIT_EXT)) {

Carregando…
Cancelar
Salvar