diff options
author | James Moger <james.moger@gitblit.com> | 2011-06-01 20:47:05 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-06-01 20:47:05 -0400 |
commit | a3bde69e9b3f3cc6212b0cd5fd7310b6a3301d8c (patch) | |
tree | b6852da4e7256bad356de93d6444d4bd96356178 | |
parent | a1ea877042b93949ef244b96e8affd65cc3f89c1 (diff) | |
download | gitblit-a3bde69e9b3f3cc6212b0cd5fd7310b6a3301d8c.tar.gz gitblit-a3bde69e9b3f3cc6212b0cd5fd7310b6a3301d8c.zip |
Documentation. Enforce ".git" suffix for created repositories.
-rw-r--r-- | docs/00_setup.mkd | 6 | ||||
-rw-r--r-- | src/com/gitblit/GitBlit.java | 4 | ||||
-rw-r--r-- | src/com/gitblit/wicket/GitBlitWebApp.properties | 4 | ||||
-rw-r--r-- | 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 `/ _ - .`<br/>
+Repository names must be unique and are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS. The name must be composed of letters, digits, or `/ _ - .`<br/>
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 @@ <form wicket:id="editForm">
<table class="plain">
<tbody>
- <tr><th><wicket:message key="gb.name"></wicket:message></th><td class="edit"><input type="text" wicket:id="name" id="name" size="40" tabindex="1" /></td></tr>
+ <tr><th><wicket:message key="gb.name"></wicket:message></th><td class="edit"><input type="text" wicket:id="name" id="name" size="40" tabindex="1" /> <i><wicket:message key="gb.nameDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.description"></wicket:message></th><td class="edit"><input type="text" wicket:id="description" size="40" tabindex="2" /></td></tr>
- <tr><th><wicket:message key="gb.owner"></wicket:message></th><td class="edit"><select wicket:id="owner" tabindex="3" /></td></tr>
+ <tr><th><wicket:message key="gb.owner"></wicket:message></th><td class="edit"><select wicket:id="owner" tabindex="3" /> <i><wicket:message key="gb.ownerDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.enableTickets"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="useTickets" tabindex="4" /> <i><wicket:message key="gb.useTicketsDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.enableDocs"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="useDocs" tabindex="5" /> <i><wicket:message key="gb.useDocsDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.showRemoteBranches"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="showRemoteBranches" tabindex="6" /> <i><wicket:message key="gb.showRemoteBranchesDescription"></wicket:message></i></td></tr>
|