]> git.madduck.net Git - gitweb-conf.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

simplify repo auth for gitweb
authormartin f. krafft <madduck@madduck.net>
Thu, 27 May 2010 17:20:37 +0000 (19:20 +0200)
committermartin f. krafft <madduck@madduck.net>
Thu, 27 May 2010 17:20:37 +0000 (19:20 +0200)
gitweb.conf

index bf549aa0f9d71a4f5241a0b0ad25c7c94940be59..3dcc6517fba3d2146452be144f5f93e89afc4ac3 100644 (file)
@@ -16,25 +16,4 @@ $feature{'pathinfo'}{'default'} = [1];
 $feature{'forks'}{'default'} = [1];
 $prevent_xss = 1;
 
-my $gl_conf_compiled = "/srv/git/.gitolite/conf/gitolite.conf-compiled.pm";
-my $username = $cgi->remote_user;
-
-our %repos;
-die "parse $gl_conf_compiled failed: " . ($! or $@) unless do $gl_conf_compiled;
-
-$export_auth_hook = sub {
-#    open FILE, ">>/tmp/gitweb.auth" or die $!;
-
-    my $reponame = "$vhostdir/$pubdir/" . shift;
-    # gitweb passes us the full repo path; so we strip the beginning...
-    $reponame =~ s/\Q$projectroot\E\/?//;
-    # ...and the end, to get the repo name as it is specified in gitolite conf
-    $reponame =~ s/\.git$//;
-
-#    use Data::Dumper;
-#    print FILE Dumper($username, $reponame, $repos);
-#    close FILE;
-
-    return exists $repos{$reponame}{R}{$username}
-        || exists $repos{$reponame}{R}{'@all'};
-};
+$export_auth_hook = sub { return -e "$_[0]/git-daemon-export-ok"; };