From a3bde69e9b3f3cc6212b0cd5fd7310b6a3301d8c Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Wed, 01 Jun 2011 20:47:05 -0400 Subject: [PATCH] Documentation. Enforce ".git" suffix for created repositories. --- src/com/gitblit/GitBlit.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/com/gitblit/GitBlit.java b/src/com/gitblit/GitBlit.java index c6eb613..7182d9b 100644 --- a/src/com/gitblit/GitBlit.java +++ b/src/com/gitblit/GitBlit.java @@ -225,6 +225,10 @@ boolean isCreate) throws GitBlitException { Repository r = null; if (isCreate) { + // ensure created repository name ends with .git + if (!repository.name.endsWith(org.eclipse.jgit.lib.Constants.DOT_GIT_EXT)) { + repository.name += org.eclipse.jgit.lib.Constants.DOT_GIT_EXT; + } if (new File(repositoriesFolder, repository.name).exists()) { throw new GitBlitException(MessageFormat.format( "Can not create repository ''{0}'' because it already exists.", -- Gitblit v1.9.1