document repo config support

This commit is contained in:
Sitaram Chamarty 2009-12-09 12:16:22 +05:30
parent 3403d40d0e
commit 64979c18ea
3 changed files with 53 additions and 0 deletions

View file

@ -181,3 +181,26 @@ repo linux perl
# give gitweb access as described above if you're specifying a description
gitolite "Sitaram Chamarty" = "fast, secure, access control for git in a corporate environment"
# REPO SPECIFIC GITCONFIG
# -----------------------
# (Thanks to teemu dot matilainen at iki dot fi)
# this should be specified within a "repo" stanza
# syntax:
# config sectionname.keyname = [optional value_string]
# example usage: if you placed a hook in src/hooks that requires configuration
# information that is specific to each repo, you could do this:
repo gitolite
config hooks.mailinglist = gitolite-commits@example.tld
config hooks.emailprefix = "[gitolite] "
config foo.bar = ""
config foo.baz =
# This does either a plain "git config section.key value" (for the first 3
# examples above) or "git config --unset-all section.key" (for the last
# example). Other forms (--add, the value_regex, etc) are not supported.

View file

@ -9,6 +9,7 @@ In this document:
* adding users and repos
* specifying gitweb and daemon access
* custom hooks
* custom git config
### administer
@ -90,3 +91,25 @@ just run easy install once again; it'll do it to existing repos also.
implements all the branch-level permissions in gitolite. If you fiddle with
the hooks directory, please make sure you do not mess with this file
accidentally, or all your fancy per-branch permissions will stop working.**
#### custom git config
The custom hooks feature is a blunt instrument -- all repos get the hook you
specified and will run it. In order to make it a little more fine-grained,
you could set your hooks to only work if a certain "gitconfig" variable was
set. Which means we now need a way to specify "git config" settings on a per
repository basis.
Thanks to Teemu (teemu dot matilainen at iki dot fi), gitolite now does this
very easily. For security reasons, this can only be done from the master
config file (i.e., if you're using delegation, the delegated admins cannot
specify git config settings).
Please see `conf/example.conf` for syntax. Note that this only supports the
basic forms of the "git config" command:
git config section.key value # value may be an empty string
git config --unset-all section.key
It does not (currently) support other options like `--add`, the `value_regex`,
etc.

View file

@ -19,6 +19,7 @@ In this document:
* what repos do I have access to?
* "exclude" (or "deny") rules
* "personal" branches
* custom hooks and custom git config
* design choices
* keeping the parser and the access control separate
@ -530,6 +531,12 @@ first check:
Just don't *show* the user this config file; it might sound insulting :-)
#### custom hooks and custom git config
You can specify hooks that you want to propagate to all repos, as well as
per-repo "gitconfig" settings. Please see `doc/2-admin.mkd` and
`conf/example.conf` for details.
### design choices
#### keeping the parser and the access control separate