build.xml | ●●●●● patch | view | raw | blame | history | |
distrib/gitblit.properties | ●●●●● patch | view | raw | blame | history | |
docs/00_index.mkd | ●●●●● patch | view | raw | blame | history | |
docs/03_faq.mkd | ●●●●● patch | view | raw | blame | history | |
docs/04_releases.mkd | ●●●●● patch | view | raw | blame | history | |
resources/bootstrap.gb.css | ●●●●● patch | view | raw | blame | history | |
src/com/gitblit/Constants.java | ●●●●● patch | view | raw | blame | history | |
src/com/gitblit/GitBlitServer.java | ●●●●● patch | view | raw | blame | history | |
src/com/gitblit/build/BuildSite.java | ●●●●● patch | view | raw | blame | history | |
src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java | ●●●●● patch | view | raw | blame | history |
build.xml
@@ -210,6 +210,7 @@ <include name="book_16x16.png" /> <include name="blank.png" /> <include name="federated_16x16.png" /> <include name="arrow_page.png" /> </fileset> <!-- Copy Doc images --> @@ -489,6 +490,7 @@ <include name="book_16x16.png" /> <include name="blank.png" /> <include name="federated_16x16.png" /> <include name="arrow_page.png" /> </fileset> <!-- Copy Doc images --> distrib/gitblit.properties
@@ -126,7 +126,7 @@ # This can point to a file with Markdown content. # Specifying "gitblit" uses the internal login message. # # SINCE 0.6.1 # SINCE 0.7.0 web.loginMessage = gitblit # This is the message displayed above the repositories table. @@ -465,6 +465,12 @@ # RESTART REQUIRED server.useNio = true # Context path for the application. # # SINCE 0.7.0 # RESTART REQUIRED server.contextPath = / # Standard http port to serve. <= 0 disables this connector. # On Unix/Linux systems, ports < 1024 require root permissions. # Recommended value: 80 or 8080 docs/00_index.mkd
@@ -42,6 +42,7 @@ - fixed: Null pointer exception if did not set federation strategy (issue 20) - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later - added: IUserService.setup(IStoredSettings) for custom user service implementations - added: setting to control Gitblit GO context path for proxy setups<br/>**New:** *server.contextPath = /* issues, binaries, and sources @ [Google Code][googlecode]<br/> sources @ [Github][gitbltsrc] docs/03_faq.mkd
@@ -36,12 +36,14 @@ ### Gitblit WAR will not authenticate any users?! Confirm that the <context-param> *realm.userService* value in your `web.xml` file actually points to a `users.properties` file. ### Gitblit won't open my grouped repository (/group/myrepo.git) or browse my branch/tag/ref?! This is likely an url encoding/decoding problem related to your servlet container's security. There are two possible workarounds for this issue. In `gitblit.properties` or `web.xml`: ### Gitblit won't open my grouped repository (/group/myrepo.git) or browse my log/branch/tag/ref?! This is likely an url encoding/decoding problem with forward slashes. There are two possible workarounds for this issue. In `gitblit.properties` or `web.xml`: 1. try setting *web.mountParameters* to *false*.<br/>This changes the url scheme from mounted (*/commit/myrepo.git/abcdef*) to parameterized (*/commit/?r=myrepo.git&h=abcdef*). 2. try changing *web.forwardSlashCharacter* to an asterisk or a **!** Also, if you are running Gitblit behind a proxy, you must ensure that the proxy does not decode and then re-encode request urls with interpretation of *%2F*. If you are using Apache mod_proxy, specify [AllowEncodedSlashes NoDecode](http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes). ## General Interest Questions ### Gitblit? What kind of name is that? docs/04_releases.mkd
@@ -16,6 +16,7 @@ - fixed: Null pointer exception if did not set federation strategy (issue 20) - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later - added: IUserService.setup(IStoredSettings) for custom user service implementations - added: setting to control Gitblit GO context path for proxy setups<br/>**New:** *server.contextPath = /* ### Older Releases resources/bootstrap.gb.css
@@ -52,6 +52,10 @@ background-position: center bottom; } .topbar .active a { background-color: transparent !important; } .breadcrumb { margin-top: 5px !important; margin-bottom: 5px !important; src/com/gitblit/Constants.java
@@ -29,7 +29,7 @@ // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. public static final String VERSION = "0.6.1-SNAPSHOT"; public static final String VERSION = "0.7.0-SNAPSHOT"; // The build script extracts this exact line so be careful editing it // and only use A-Z a-z 0-9 .-_ in the string. src/com/gitblit/GitBlitServer.java
@@ -209,7 +209,7 @@ // Root WebApp Context WebAppContext rootContext = new WebAppContext(); rootContext.setContextPath("/"); rootContext.setContextPath(settings.getString(Keys.server.contextPath, "/")); rootContext.setServer(server); rootContext.setWar(location.toExternalForm()); rootContext.setTempDirectory(tempDir); src/com/gitblit/build/BuildSite.java
@@ -91,24 +91,6 @@ System.out.println(MessageFormat.format("Generating site from {0} Markdown Docs in {1} ", markdownFiles.length, sourceFolder.getAbsolutePath())); String linkPattern = "<li><a href=''{0}''>{1}</a></li>"; StringBuilder sb = new StringBuilder(); for (File file : markdownFiles) { String documentName = getDocumentName(file); if (!params.skips.contains(documentName)) { String displayName = documentName; if (aliasMap.containsKey(documentName)) { displayName = aliasMap.get(documentName); } else { displayName = displayName.replace('_', ' '); } String fileName = documentName + ".html"; sb.append(MessageFormat.format(linkPattern, fileName, displayName)); sb.append(" | "); } } sb.setLength(sb.length() - 3); sb.trimToSize(); String htmlHeader = FileUtils.readContent(new File(params.pageHeader), "\n"); @@ -120,7 +102,15 @@ } } String htmlFooter = FileUtils.readContent(new File(params.pageFooter), "\n"); String links = sb.toString(); final String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); final String footer = MessageFormat.format(htmlFooter, "generated " + date); for (File file : markdownFiles) { String documentName = getDocumentName(file); if (params.skips.contains(documentName)) { continue; } try { String links = createLinks(file, markdownFiles, aliasMap, params.skips); String header = MessageFormat.format(htmlHeader, Constants.FULL_NAME, links); if (!StringUtils.isEmpty(params.analyticsSnippet)) { File snippet = new File(params.analyticsSnippet); @@ -129,15 +119,9 @@ header = header.replace("<!-- ANALYTICS -->", htmlSnippet); } } final String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); final String footer = MessageFormat.format(htmlFooter, "generated " + date); for (File file : markdownFiles) { try { String documentName = getDocumentName(file); if (!params.skips.contains(documentName)) { String fileName = documentName + ".html"; System.out.println(MessageFormat.format(" {0} => {1}", file.getName(), fileName)); System.out.println(MessageFormat.format(" {0} => {1}", file.getName(), fileName)); String rawContent = FileUtils.readContent(file, "\n"); String markdownContent = rawContent; @@ -161,8 +145,7 @@ if (endCode == 0) { strippedContent.append(markdownContent.substring(0, beginCode)); } else { strippedContent.append(markdownContent .substring(endCode, beginCode)); strippedContent.append(markdownContent.substring(endCode, beginCode)); } strippedContent.append(nomarkdownKey); endCode = markdownContent.indexOf(endToken, beginCode); @@ -209,8 +192,8 @@ loadedContent = StringUtils.breakLinesForHtml(loadedContent); content = content.replace(kv[0], loadedContent); } OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream( new File(destinationFolder, fileName)), Charset.forName("UTF-8")); OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(new File( destinationFolder, fileName)), Charset.forName("UTF-8")); writer.write(header); if (!StringUtils.isEmpty(htmlAdSnippet)) { writer.write(htmlAdSnippet); @@ -218,7 +201,6 @@ writer.write(content); writer.write(footer); writer.close(); } } catch (Throwable t) { System.err.println("Failed to transform " + file.getName()); t.printStackTrace(); @@ -237,6 +219,33 @@ return displayName; } private static String createLinks(File currentFile, File[] markdownFiles, Map<String, String> aliasMap, List<String> skips) { String linkPattern = "<li><a href=''{0}''>{1}</a></li>"; String currentLinkPattern = "<li class=''active''><a href=''{0}''>{1}</a></li>"; StringBuilder sb = new StringBuilder(); for (File file : markdownFiles) { String documentName = getDocumentName(file); if (!skips.contains(documentName)) { String displayName = documentName; if (aliasMap.containsKey(documentName)) { displayName = aliasMap.get(documentName); } else { displayName = displayName.replace('_', ' '); } String fileName = documentName + ".html"; if (currentFile.getName().equals(file.getName())) { sb.append(MessageFormat.format(currentLinkPattern, fileName, displayName)); } else { sb.append(MessageFormat.format(linkPattern, fileName, displayName)); } } } sb.setLength(sb.length() - 3); sb.trimToSize(); return sb.toString(); } private static String generatePropertiesContent(File propertiesFile) throws Exception { // Read the current Gitblit properties BufferedReader propertiesReader = new BufferedReader(new FileReader(propertiesFile)); src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java
@@ -15,8 +15,15 @@ */ package com.gitblit.wicket; import java.text.MessageFormat; import org.apache.wicket.IRequestTarget; import org.apache.wicket.Page; import org.apache.wicket.PageParameters; import org.apache.wicket.request.RequestParameters; import org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.gitblit.GitBlit; import com.gitblit.Keys; @@ -32,6 +39,8 @@ * */ public class GitblitParamUrlCodingStrategy extends MixedParamUrlCodingStrategy { private Logger logger = LoggerFactory.getLogger(GitblitParamUrlCodingStrategy.class); /** * Construct. @@ -78,4 +87,23 @@ } return super.urlDecodePathComponent(value); } /** * Gets the decoded request target. * * @param requestParameters * the request parameters * @return the decoded request target */ @Override public IRequestTarget decode(RequestParameters requestParameters) { final String parametersFragment = requestParameters.getPath().substring( getMountPath().length()); logger.debug(MessageFormat .format("REQ: {0} PARAMS {1}", getMountPath(), parametersFragment)); final PageParameters parameters = new PageParameters(decodeParameters(parametersFragment, requestParameters.getParameters())); return super.decode(requestParameters); } }