From a3bde69e9b3f3cc6212b0cd5fd7310b6a3301d8c Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 1 Jun 2011 20:47:05 -0400 Subject: Documentation. Enforce ".git" suffix for created repositories. --- docs/00_setup.mkd | 6 +++++- src/com/gitblit/GitBlit.java | 4 ++++ src/com/gitblit/wicket/GitBlitWebApp.properties | 4 +++- src/com/gitblit/wicket/pages/EditRepositoryPage.html | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/00_setup.mkd b/docs/00_setup.mkd index 2eddd44f..48e02b7a 100644 --- a/docs/00_setup.mkd +++ b/docs/00_setup.mkd @@ -32,9 +32,13 @@ All repository settings are stored within the repository `.git/config` file unde showReadme = false #### Repository Names -Repository names must be unique and are case-insensitive. The name must be composed of letters, digits, or `/ _ - .`
+Repository names must be unique and are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS. The name must be composed of letters, digits, or `/ _ - .`
Whitespace is illegal. +Repositories can be grouped by folders. e.g. *libraries/mycoollib.git* and *libraries/myotherlib.git* + +Repository names will automatically have *.git* appended to the name at creation time, if not already specified. + #### Repository Owner The *Repository Owner* has the special permission of being able to edit a repository through the web UI. The Repository Owner is not permitted to rename the repository, delete the repository, or reassign ownership to another user. diff --git a/src/com/gitblit/GitBlit.java b/src/com/gitblit/GitBlit.java index c6eb613d..7182d9b7 100644 --- a/src/com/gitblit/GitBlit.java +++ b/src/com/gitblit/GitBlit.java @@ -225,6 +225,10 @@ public class GitBlit implements ServletContextListener { 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.", diff --git a/src/com/gitblit/wicket/GitBlitWebApp.properties b/src/com/gitblit/wicket/GitBlitWebApp.properties index 16f2aa0a..2ba03e6e 100644 --- a/src/com/gitblit/wicket/GitBlitWebApp.properties +++ b/src/com/gitblit/wicket/GitBlitWebApp.properties @@ -91,4 +91,6 @@ gb.isFrozen = is frozen gb.isFrozenDescription = deny push operations gb.zip = zip gb.showReadme = show readme -gb.showReadmeDescription = show a \"readme\" markdown file on the summary page \ No newline at end of file +gb.showReadmeDescription = show a \"readme\" markdown file on the summary page +gb.nameDescription = use '/' to group repositories. e.g. libraries/mycoollib.git +gb.ownerDescription = the owner may edit repository settings \ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/EditRepositoryPage.html b/src/com/gitblit/wicket/pages/EditRepositoryPage.html index 775a5d22..1a3a657f 100644 --- a/src/com/gitblit/wicket/pages/EditRepositoryPage.html +++ b/src/com/gitblit/wicket/pages/EditRepositoryPage.html @@ -15,9 +15,9 @@
- + - + -- cgit v1.2.3