Override the cgit url settings in gerrit

The upstream ones add a .git. That does't work.

Values taken from:

  http://git.openstack.org/cgit/openstack-infra/gerrit/tree/gerrit-server/src/main/java/com/google/gerrit/server/config/GitwebConfig.java?h=openstack/2.13.8#n158

Change-Id: I197bc90b58db9e7048cc9a3892ef3dcfa575598f
This commit is contained in:
Monty Taylor 2017-09-19 16:18:36 -05:00
parent 9740afe771
commit dce6e65c8e
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 10 additions and 1 deletions

View File

@ -182,12 +182,21 @@
session = <%= @melody_session %>
[plugin "javamelody"]
allowTopMenu = <%= @enable_javamelody_top_menu %>
# Gerrit upstream hardcodes a .git extension for cgit.
# The cgit settings below are the same just without the
# .git extension.
<% if @gitweb or @cgit -%>
[gitweb]
<% if @gitweb -%>
revision = "?p=${project}.git;a=commitdiff;h=${commit}"
<% else -%>
type = cgit
type = custom
project = "${project}/summary"
revision = "${project}/commit/?id=${commit}"
branch = "${project}/log/?h=${branch}"
roottree = "${project}/tree/?h=${commit}"
file = "${project}/tree/${file}?h=${commit}"
filehistory = "${project}/log/${file}?h=${branch}"
<% end -%>
<% if scope.lookupvar("gerrit::web_repo_url") -%>
url = "<%= scope.lookupvar('gerrit::web_repo_url') %>"