# SINCE 0.9.0\r
web.allowLuceneIndexing = true\r
\r
+# Controls the length of shortened commit hash ids\r
+#\r
+# SINCE 1.2.0\r
+web.shortCommitIdLength = 8\r
+\r
# Use Clippy (Flash solution) to provide a copy-to-clipboard button.\r
# If false, a button with a more primitive JavaScript-based prompt box will\r
# offer a 3-step (click, ctrl+c, enter) copy-to-clipboard alternative.\r
**New:** *git.garbageCollectionHour = 0* \r
**New:** *git.defaultGarbageCollectionThreshold = 500k* \r
**New:** *git.defaultGarbageCollectionPeriod = 7 days*\r
+- Added setting to control length of shortened commit ids \r
+ **New:** *web.shortCommitIdLength=8* \r
- Added simple project pages. A project is a subfolder off the *git.repositoriesFolder*.\r
- Added support for X-Forwarded-Context for Apache subdomain proxy configurations (issue 135)\r
- Delete branch feature (issue 121, Github/ajermakovics)\r
def mountParameters\r
def forwardSlashChar\r
def includeGravatar\r
+ def shortCommitIdLength\r
def commitCount = 0\r
def commands\r
def writer = new StringWriter();\r
}\r
\r
def writeCommit(commit) {\r
- def abbreviated = repository.newObjectReader().abbreviate(commit.id, 8).name()\r
+ def abbreviated = repository.newObjectReader().abbreviate(commit.id, shortCommitIdLength).name()\r
def author = commit.authorIdent.name\r
def email = commit.authorIdent.emailAddress\r
def message = commit.shortMessage\r
mailWriter.url = url\r
mailWriter.mountParameters = gitblit.getBoolean(Keys.web.mountParameters, true)\r
mailWriter.includeGravatar = gitblit.getBoolean(Keys.web.allowGravatar, true)\r
+mailWriter.shortCommitIdLength = GitBlit.getInteger(Keys.web.shortCommitIdLength, 8)\r
\r
def content = mailWriter.write()\r
\r
}\r
\r
protected String getShortObjectId(String objectId) {\r
- return objectId.substring(0, 8);\r
+ return objectId.substring(0, GitBlit.getInteger(Keys.web.shortCommitIdLength, 8));\r
}\r
\r
protected void addRefs(Repository r, RevCommit c) {\r