From 1363534d8d01323bb084c13d005ff0993ce19d57 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Fri, 3 Feb 2012 06:56:49 +0530 Subject: [PATCH] honor GL_NO_DAEMON_NO_GITWEB for wild repos also Thanks to Kacper Kornet for catching this... (by the way, there's a simple workaround if you are affected by this but can't upgrade to this commit or later: just create an empty $PROJECTS_LIST file, which is by default ~/projects.list) --- doc/big-config.mkd | 13 +++++++------ src/gitolite.pm | 6 ++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/doc/big-config.mkd b/doc/big-config.mkd index 2aaa61a..31059ed 100644 --- a/doc/big-config.mkd +++ b/doc/big-config.mkd @@ -2,8 +2,9 @@ This document is just background info; you don't actually need to read the whole thing if you don't care. All you need to do is set `BIG_CONFIG` to 1 in -the rc file and you're done. If you have no use for gitweb and daemon, you -can save even more time by setting `GL_NO_DAEMON_NO_GITWEB`. +the rc file and you're done. If you have no use for gitweb, git-daemon, or +[git config][rsgc], you can save even more time by setting +`GL_NO_DAEMON_NO_GITWEB`. Finally, if you're *really* an expert (or your initials are "JK"), you can even set `GL_NO_CREATE_REPOS` and `GL_NO_SETUP_AUTHKEYS`. However, be warned @@ -147,10 +148,10 @@ first one): `GL_NO_DAEMON_NO_GITWEB` is a very useful optimisation that you *must* enable if you *do* have a large number of repositories, and do *not* use gitolite's -support for gitweb or git-daemon access (see "[this][gwd]" for details). This will save a -lot of time when you push the gitolite-admin repo with changes. This variable -also controls whether "git config" lines (such as `config hooks.emailprefix = -"[gitolite]"`) will be processed or not. +support for gitweb or git-daemon access (see "[this][gwd]" for details). This +will save a lot of time when you push the gitolite-admin repo with changes. +This variable also controls whether "git config" lines (such as `config +hooks.emailprefix = "[gitolite]"`) will be processed or not. You should be a lot more careful with `GL_NO_CREATE_REPOS` and `GL_NO_SETUP_AUTHKEYS`. These are meant for installations where some backend diff --git a/src/gitolite.pm b/src/gitolite.pm index acd7ff0..062706f 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -443,6 +443,8 @@ sub get_set_desc sub setup_git_configs { + return if $GL_NO_DAEMON_NO_GITWEB; + my ($repo, $git_configs_p) = @_; # new_wild calls us without checking! @@ -476,6 +478,8 @@ sub setup_git_configs my $export_ok = "git-daemon-export-ok"; sub setup_daemon_access { + return if $GL_NO_DAEMON_NO_GITWEB; + my $repo = shift; if (can_read($repo, 'daemon')) { @@ -507,6 +511,8 @@ sub setup_web_access { } sub add_del_web_access { + return if $GL_NO_DAEMON_NO_GITWEB; + # input is a repo name. Code could simply use `can_read($repo, 'gitweb')` # to determine whether to add or delete the repo from web access. # However, "desc" also factors into this so we have think about this.