diff options
author | 2012-04-13 05:07:22 +0530 | |
---|---|---|
committer | 2012-04-13 05:56:29 +0530 | |
commit | f73e3d70d0be9c2fd975700cd17f41f2f5651e9d (patch) | |
tree | 7f9a2621cecfcd9ac83ac635eab9113c2f9767b7 | |
parent | next round of doc fixes (diff) | |
download | gitolite-gentoo-f73e3d70d0be9c2fd975700cd17f41f2f5651e9d.tar.gz gitolite-gentoo-f73e3d70d0be9c2fd975700cd17f41f2f5651e9d.tar.bz2 gitolite-gentoo-f73e3d70d0be9c2fd975700cd17f41f2f5651e9d.zip |
git-config should work even if description is set!
the optimisation that I just broke here was responsible for a bug that
ignores config entries if you also had a description there
repo @all
config foo.bar.testAAA = "testAAA"
repo foo1 foo2
RW+ = u1 u2
R = gitweb
foo1 "sitaram" = "some project"
This is because the %git_configs hash has been wiped out earlier (when
can_read($repo, "gitweb") was first called) yet now you're not giving it
a chance to get filled because $desc short-circuits can_read.
(incidentally, this is one of those things that makes g3 so nice in
comparision, because I decided not to be so fixated on efficiency!)
-rw-r--r-- | src/gitolite.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gitolite.pm b/src/gitolite.pm index fbae91d..132bdbe 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -585,7 +585,7 @@ sub setup_gitweb_access system("git config --remove-section gitweb 2>/dev/null"); } - return ($desc or can_read($repo, 'gitweb')); + return (can_read($repo, 'gitweb') or $desc); # this return value is used by the caller to write to projects.list } |