Skip to content

Commit

Permalink
Merge branch 'kn/gitweb-extra-branch-refs'
Browse files Browse the repository at this point in the history
Allow gitweb to be configured to show refs out of refs/heads/ as if
they were branches.

* kn/gitweb-extra-branch-refs:
  gitweb: Denote non-heads, non-remotes branches
  gitweb: Add a feature for adding more branch refs
  gitweb: Return 1 on validation success instead of passed input
  gitweb: Move check-ref-format code into separate function
  • Loading branch information
Junio C Hamano committed Dec 17, 2013
2 parents 1945e8a + e374747 commit 173473c
Show file tree
Hide file tree
Showing 2 changed files with 175 additions and 46 deletions.
37 changes: 37 additions & 0 deletions Documentation/gitweb.conf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,43 @@ time zones in the form of "+/-HHMM", such as "+0200".
+
Project specific override is not supported.

extra-branch-refs::
List of additional directories under "refs" which are going to
be used as branch refs. For example if you have a gerrit setup
where all branches under refs/heads/ are official,
push-after-review ones and branches under refs/sandbox/,
refs/wip and refs/other are user ones where permissions are
much wider, then you might want to set this variable as
follows:
+
--------------------------------------------------------------------------------
$feature{'extra-branch-refs'}{'default'} =
['sandbox', 'wip', 'other'];
--------------------------------------------------------------------------------
+
This feature can be configured on per-repository basis after setting
$feature{'extra-branch-refs'}{'override'} to true, via repository's
`gitweb.extraBranchRefs` configuration variable, which contains a
space separated list of refs. An example:
+
--------------------------------------------------------------------------------
[gitweb]
extraBranchRefs = sandbox wip other
--------------------------------------------------------------------------------
+
The gitweb.extraBranchRefs is actually a multi-valued configuration
variable, so following example is also correct and the result is the
same as of the snippet above:
+
--------------------------------------------------------------------------------
[gitweb]
extraBranchRefs = sandbox
extraBranchRefs = wip other
--------------------------------------------------------------------------------
+
It is an error to specify a ref that does not pass "git check-ref-format"
scrutiny. Duplicated values are filtered.


EXAMPLES
--------
Expand Down
Loading

0 comments on commit 173473c

Please sign in to comment.