Skip to content

Commit

Permalink
add update-gitweb-daemon-from-options to docs
Browse files Browse the repository at this point in the history
also deprecate (in documentation) this:

    config foo.bar =

i.e., allow only

    config foo.bar = ""

The sugar parser for the 'option' line can't deal with it and I decided
it's better to de-emphasise it.

See d8df4a9 (in the gitolite repo) for additional background/history.
  • Loading branch information
sitaramc committed Dec 19, 2012
1 parent 393cfca commit 4c04861
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
15 changes: 7 additions & 8 deletions git-config.mkd
Expand Up @@ -13,26 +13,25 @@ Here's all you want to know about setting repo-specific git-config values.
The syntax is simple: The syntax is simple:


config sectionname.keyname = [optional value_string] config sectionname.keyname = value


For example: For example:


repo gitolite repo gitolite
config hooks.mailinglist = gitolite-commits@example.tld config hooks.mailinglist = gitolite-commits@example.tld
config hooks.emailprefix = "[gitolite] " config hooks.emailprefix = "[gitolite] "
config foo.bar = "" config foo.bar = ""
config foo.baz =


This does either a plain "git config section.key value" (for the first 2 This does either a plain "git config section.key value" (for the first 2
examples above) or "git config --unset-all section.key" (for the last 2 examples above) or "git config --unset-all section.key" (for the last
examples). Other forms of the `git config` command (`--add`, the example). Other forms of the `git config` command (`--add`, the
`value_regex`, etc) are not supported. `value_regex`, etc) are not supported.


> ---- > ----
> **WARNING**: simply deleting the config line from the `conf/gitolite.conf` > **WARNING**: simply deleting the config line from the `conf/gitolite.conf`
> file will *not* delete the variable from `repo.git/config`. You have to > file will *not* delete the variable from `repo.git/config`. You have to
> use the syntax in either of the last 2 examples to make gitolite execute a > use the syntax in the last example to make gitolite execute a
> `--unset-all` operation on the given key. > `--unset-all` operation on the given key.
> ---- > ----
Expand All @@ -45,7 +44,7 @@ available to [wild][] repos.
config hooks.mailinglist = %GL_REPO-commits@example.tld config hooks.mailinglist = %GL_REPO-commits@example.tld
config hooks.emailprefix = "[%GL_REPO] " config hooks.emailprefix = "[%GL_REPO] "


You can repeat the 'config' line as many times as you like, and the last You can repeat the 'config' line as many times as you like, and the *last*
occurrence will be the one in effect. This allows you to override settings occurrence will be the one in effect. This allows you to override settings
just for one project, as in this example: just for one project, as in this example:


Expand All @@ -60,8 +59,8 @@ just for one project, as in this example:
The "delete config variable" syntax can also be used, if you wish: The "delete config variable" syntax can also be used, if you wish:


repo secret # no emails for this one please repo secret # no emails for this one please
config hooks.mailinglist = config hooks.mailinglist = ""
config hooks.emailprefix = config hooks.emailprefix = ""


As you can see, the general idea is to place the most generic ones (`repo As you can see, the general idea is to place the most generic ones (`repo
@all`, or repo patterns like `repo foo.*`) first, and place more specific ones @all`, or repo patterns like `repo foo.*`) first, and place more specific ones
Expand Down
20 changes: 20 additions & 0 deletions options.mkd
Expand Up @@ -3,6 +3,10 @@
Some gitolite features are enabled, or gitolite's behaviour changed, by Some gitolite features are enabled, or gitolite's behaviour changed, by
setting "options". setting "options".


A line like 'option foo = 1' is really just syntactic sugar for 'config
gitolite-options.foo = 1', so everything in the [git-config][] page also
applies here.

Options are set by repo. The syntax is very simple: Options are set by repo. The syntax is very simple:


option foo.bar = baz option foo.bar = baz
Expand All @@ -18,3 +22,19 @@ Here are the currently recognised options:


* [mirroring][] related options -- tell gitolite who is the master server, * [mirroring][] related options -- tell gitolite who is the master server,
and who are the slaves, for each repo. and who are the slaves, for each repo.

* the optional post-compile trigger 'update-gitweb-daemon-from-options'
allows you to use options instead of special usernames gitweb and daemon
to determine access for those tools.

Here's how to disable an option from a single repo if it was enabled earlier
in a group (which you might guess from reading the [git-config][] page):

@g = r1 r2 r3

repo @g
option gitweb = 1

# but repo r2 should not be accessible by gitweb
repo r2
option gitweb = ""

0 comments on commit 4c04861

Please sign in to comment.