List for cgit developers and users
 help / color / mirror / Atom feed
Subject: [PATCH 2/2] Documentation for the gitconfig sourcing.
Date: Sun,  7 Oct 2012 23:23:47 +0200	[thread overview]
Message-ID: <1349645027-22007-3-git-send-email-necoro@necoro.net> (raw)
In-Reply-To: <1349645027-22007-1-git-send-email-necoro@necoro.net>

Document the 'enable-git-config' option and give an example of a a gitolite
configuration.
---
 cgitrc.5.txt |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 902fff3..52c33e3 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -163,6 +163,13 @@ enable-tree-linenumbers::
 	Flag which, when set to "1", will make cgit generate linenumber links
 	for plaintext blobs printed in the tree view. Default value: "1".
 
+enable-git-config::
+    Flag which, when set to "1", will allow cgit to use git config to set
+    any repo specific settings. Please read <<repo-settings>> to learn more
+    about which settings are available. This option is used in conjunction with
+    "scan-path" to override _repo._ settings. Please read <<git-config>> to
+    learn how to integrate with gitolite.  Default value: "0".
+
 favicon::
 	Url used as link to a shortcut icon for cgit. If specified, it is
 	suggested to use the value "/favicon.ico" since certain browsers will
@@ -394,6 +401,7 @@ virtual-root::
 	NOTE: cgit has recently learned how to use PATH_INFO to achieve the
 	same kind of virtual urls, so this option will probably be deprecated.
 
+[[repo-settings]]
 REPOSITORY SETTINGS
 -------------------
 repo.about-filter::
@@ -509,6 +517,45 @@ options are only acknowledged in repo-specific config files when
 Note: the "repo." prefix is dropped from the option names in repo-specific
 config files, e.g. "repo.desc" becomes "desc".
 
+[[git-config]]
+REPOSITORY-SPECIFIC GIT CONFIG
+------------------------------
+When "scan-path" is used to auto-discover repositories "enable-git-config" will
+allow cgit to look at git config to obtain repo specific settings.
+This is especially helpful for tools like gitolite, that allow setting git
+config values, but do not define their own interface for cgit. Please read more
+about http://sitaramc.github.com/gitolite/git-config.html[gitolite repo specific 
+commands here].
+
+Note: If the "enable-gitweb-*" options are set to "1", the corresponding gitweb
+settings are also used (in the example below: "owner", "desc", "category"). In
+case of conflicts the "cgit." setting is preferred.
+
+.Example gitolite.conf
+......
+repo aproject
+    RW+ = bob
+    config cgit.section = test
+    config cgit.logo = /cgit-data/logo.png
+    config cgit.owner = "Bob McPerson"
+    config cgit.desc =  "Bar description"
+
+repo project_with_gitweb_settings
+    RW+ = bob
+    config cgit.defbranch = development
+    owner = "Bob McPerson"
+    desc = "Foo description"
+    category = applications
+......
+
+[IMPORTANT]
+Unlike cgitrc, we're looking for repo settings with prefix "cgit.". That is, all
+options named 'repo.XY' above have to be called 'cgit.XY'.
+Remember to edit _.gitolite.rc_ and add the following:
+.......
+$GIT_CONFIG_KEYS = "cgit\..*"
+......
+
 
 FILTER API
 ----------
-- 
1.7.8.6





  parent reply	other threads:[~2012-10-07 21:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 21:23 [PATCH 0/2] Git-Config Parsing during scan-path 
2012-10-07 21:23 ` [PATCH 1/2] Read "cgit.*" settings from gitconfig 
2012-10-08 15:14   ` jamie.couture
2012-10-08 15:19     ` Jason
2012-10-08 15:24       ` 
2012-10-08 15:25         ` Jason
2012-10-07 21:23 `  [this message]
2012-10-08 21:27 ` [PATCH 0/2] Git-Config Parsing during scan-path Jason
2012-10-09  9:30   ` 
2012-10-09 11:40     ` Jason
2012-10-09 12:07       ` 
2012-10-09 12:22         ` Jason
2012-10-09 11:02   ` jamie.couture

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349645027-22007-3-git-send-email-necoro@necoro.net \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).