Permalink
Browse files

add update-gitweb-daemon-from-options to docs

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...
1 parent 393cfca commit 4c048612bd856b7f6c5706ea0a2fe51f99a1596b @sitaramc committed Dec 14, 2012
Showing with 27 additions and 8 deletions.
  1. +7 −8 git-config.mkd
  2. +20 −0 options.mkd
View
@@ -13,26 +13,25 @@ Here's all you want to know about setting repo-specific git-config values.
The syntax is simple:
- config sectionname.keyname = [optional value_string]
+ config sectionname.keyname = value
For example:
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 2
-examples above) or "git config --unset-all section.key" (for the last 2
-examples). Other forms of the `git config` command (`--add`, the
+examples above) or "git config --unset-all section.key" (for the last
+example). Other forms of the `git config` command (`--add`, the
`value_regex`, etc) are not supported.
> ----
> **WARNING**: simply deleting the config line from the `conf/gitolite.conf`
> 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.
> ----
@@ -45,7 +44,7 @@ available to [wild][] repos.
config hooks.mailinglist = %GL_REPO-commits@example.tld
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
just for one project, as in this example:
@@ -60,8 +59,8 @@ just for one project, as in this example:
The "delete config variable" syntax can also be used, if you wish:
repo secret # no emails for this one please
- config hooks.mailinglist =
- config hooks.emailprefix =
+ config hooks.mailinglist = ""
+ config hooks.emailprefix = ""
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
View
@@ -3,6 +3,10 @@
Some gitolite features are enabled, or gitolite's behaviour changed, by
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:
option foo.bar = baz
@@ -18,3 +22,19 @@ Here are the currently recognised options:
* [mirroring][] related options -- tell gitolite who is the master server,
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.