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)
This commit is contained in:
parent
ef751c4d07
commit
1363534d8d
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
This document is just background info; you don't actually need to read the
|
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
|
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
|
the rc file and you're done. If you have no use for gitweb, git-daemon, or
|
||||||
can save even more time by setting `GL_NO_DAEMON_NO_GITWEB`.
|
[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
|
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
|
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
|
`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
|
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
|
support for gitweb or git-daemon access (see "[this][gwd]" for details). This
|
||||||
lot of time when you push the gitolite-admin repo with changes. This variable
|
will save a lot of time when you push the gitolite-admin repo with changes.
|
||||||
also controls whether "git config" lines (such as `config hooks.emailprefix =
|
This variable also controls whether "git config" lines (such as `config
|
||||||
"[gitolite]"`) will be processed or not.
|
hooks.emailprefix = "[gitolite]"`) will be processed or not.
|
||||||
|
|
||||||
You should be a lot more careful with `GL_NO_CREATE_REPOS` and
|
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
|
`GL_NO_SETUP_AUTHKEYS`. These are meant for installations where some backend
|
||||||
|
|
|
@ -443,6 +443,8 @@ sub get_set_desc
|
||||||
|
|
||||||
sub setup_git_configs
|
sub setup_git_configs
|
||||||
{
|
{
|
||||||
|
return if $GL_NO_DAEMON_NO_GITWEB;
|
||||||
|
|
||||||
my ($repo, $git_configs_p) = @_;
|
my ($repo, $git_configs_p) = @_;
|
||||||
|
|
||||||
# new_wild calls us without checking!
|
# new_wild calls us without checking!
|
||||||
|
@ -476,6 +478,8 @@ sub setup_git_configs
|
||||||
my $export_ok = "git-daemon-export-ok";
|
my $export_ok = "git-daemon-export-ok";
|
||||||
sub setup_daemon_access
|
sub setup_daemon_access
|
||||||
{
|
{
|
||||||
|
return if $GL_NO_DAEMON_NO_GITWEB;
|
||||||
|
|
||||||
my $repo = shift;
|
my $repo = shift;
|
||||||
|
|
||||||
if (can_read($repo, 'daemon')) {
|
if (can_read($repo, 'daemon')) {
|
||||||
|
@ -507,6 +511,8 @@ sub setup_web_access {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub add_del_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')`
|
# 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.
|
# to determine whether to add or delete the repo from web access.
|
||||||
# However, "desc" also factors into this so we have think about this.
|
# However, "desc" also factors into this so we have think about this.
|
||||||
|
|
Loading…
Reference in a new issue