James Moger
2011-06-01 a3bde69e9b3f3cc6212b0cd5fd7310b6a3301d8c
Documentation.  Enforce ".git" suffix for created repositories.
4 files modified
18 ■■■■ changed files
docs/00_setup.mkd 6 ●●●● patch | view | raw | blame | history
src/com/gitblit/GitBlit.java 4 ●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/GitBlitWebApp.properties 4 ●●● patch | view | raw | blame | history
src/com/gitblit/wicket/pages/EditRepositoryPage.html 4 ●●●● patch | view | raw | blame | history
docs/00_setup.mkd
@@ -32,9 +32,13 @@
        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.
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.",
src/com/gitblit/wicket/GitBlitWebApp.properties
@@ -91,4 +91,6 @@
gb.isFrozenDescription = deny push operations
gb.zip = zip
gb.showReadme = show readme
gb.showReadmeDescription = show a \"readme\" markdown file on the summary page
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
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" /> &nbsp;<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" /> &nbsp;<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" /> &nbsp;<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" /> &nbsp;<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" /> &nbsp;<i><wicket:message key="gb.showRemoteBranchesDescription"></wicket:message></i></td></tr>