]> source.dussan.org Git - gitblit.git/commitdiff
Documentation. Enforce ".git" suffix for created repositories.
authorJames Moger <james.moger@gitblit.com>
Thu, 2 Jun 2011 00:47:05 +0000 (20:47 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 2 Jun 2011 00:47:05 +0000 (20:47 -0400)
docs/00_setup.mkd
src/com/gitblit/GitBlit.java
src/com/gitblit/wicket/GitBlitWebApp.properties
src/com/gitblit/wicket/pages/EditRepositoryPage.html

index 2eddd44f438832d71ee282c7c552259e154634c7..48e02b7a9112b5250dfe247a5c2856ee012ff32d 100644 (file)
@@ -32,9 +32,13 @@ All repository settings are stored within the repository `.git/config` file unde
            showReadme = false\r
            \r
 #### Repository Names\r
-Repository names must be unique and are case-insensitive.  The name must be composed of letters, digits, or `/ _ - .`<br/>\r
+Repository names must be unique and are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS.  The name must be composed of letters, digits, or `/ _ - .`<br/>\r
 Whitespace is illegal.\r
 \r
+Repositories can be grouped by folders.  e.g. *libraries/mycoollib.git* and *libraries/myotherlib.git*\r
+\r
+Repository names will automatically have *.git* appended to the name at creation time, if not already specified. \r
+\r
 #### Repository Owner\r
 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.\r
 \r
index c6eb613dc595d60fdd129053985201da431039d5..7182d9b7bf9aa2707dbe2f72802c25e91001aa69 100644 (file)
@@ -225,6 +225,10 @@ public class GitBlit implements ServletContextListener {
                        boolean isCreate) throws GitBlitException {\r
                Repository r = null;\r
                if (isCreate) {\r
+                       // ensure created repository name ends with .git\r
+                       if (!repository.name.endsWith(org.eclipse.jgit.lib.Constants.DOT_GIT_EXT)) {\r
+                               repository.name += org.eclipse.jgit.lib.Constants.DOT_GIT_EXT;\r
+                       }\r
                        if (new File(repositoriesFolder, repository.name).exists()) {\r
                                throw new GitBlitException(MessageFormat.format(\r
                                                "Can not create repository ''{0}'' because it already exists.",\r
index 16f2aa0a1307ad6578b257d2d2e6cbf17a455da9..2ba03e6ec8274683aa57d119746883234edaa54d 100644 (file)
@@ -91,4 +91,6 @@ gb.isFrozen = is frozen
 gb.isFrozenDescription = deny push operations\r
 gb.zip = zip\r
 gb.showReadme = show readme\r
-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\r
+gb.nameDescription = use '/' to group repositories.  e.g. libraries/mycoollib.git\r
+gb.ownerDescription = the owner may edit repository settings
\ No newline at end of file
index 775a5d22e14e5876eda1b1207eef5023e792219a..1a3a657f0bf2eda8f5733e44eaa97839ed197e5e 100644 (file)
@@ -15,9 +15,9 @@
        <form wicket:id="editForm">\r
                <table class="plain">\r
                        <tbody>\r
-                               <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>\r
+                               <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" /> &nbsp;<i><wicket:message key="gb.nameDescription"></wicket:message></i></td></tr>\r
                                <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>\r
-                               <tr><th><wicket:message key="gb.owner"></wicket:message></th><td class="edit"><select wicket:id="owner" tabindex="3" /></td></tr>\r
+                               <tr><th><wicket:message key="gb.owner"></wicket:message></th><td class="edit"><select wicket:id="owner" tabindex="3" /> &nbsp;<i><wicket:message key="gb.ownerDescription"></wicket:message></i></td></tr>\r
                                <tr><th><wicket:message key="gb.enableTickets"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="useTickets" tabindex="4" /> &nbsp;<i><wicket:message key="gb.useTicketsDescription"></wicket:message></i></td></tr>\r
                                <tr><th><wicket:message key="gb.enableDocs"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="useDocs" tabindex="5" /> &nbsp;<i><wicket:message key="gb.useDocsDescription"></wicket:message></i></td></tr>\r
                                <tr><th><wicket:message key="gb.showRemoteBranches"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="showRemoteBranches" tabindex="6" /> &nbsp;<i><wicket:message key="gb.showRemoteBranchesDescription"></wicket:message></i></td></tr>\r