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

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:

initial commit
[gitweb-conf.git] / gitweb.conf
1 $subdir = "madduck/pub";
2 $confroot = "/srv/git/gitweb/git.madduck.net";
3 $projectroot = "/srv/git/repos/$subdir";
4 $git_temp = "/tmp";
5 $site_header = "$confroot/header.html";
6 $site_footer = "$confroot/footer.html";
7 $projects_list = $projectroot;
8 $default_projects_order = "age";
9 @git_base_url_list=("git://git.madduck.net/$subdir", "ssh://git@git.madduck.net/$subdir");
10 $logo = '/git-logo.png';
11 $favicon = '/git-favicon.png';
12 push @stylesheets, '/gitweb.css';
13 push @stylesheets, '/local.css';
14 $feature{'pathinfo'}{'default'} = [1];
15 $feature{'forks'}{'default'} = [1];
16 $prevent_xss = 1;
17
18 my $gl_conf_compiled = "/srv/git/.gitolite/conf/gitolite.conf-compiled.pm";
19 my $username = $cgi->remote_user;
20
21 our %repos;
22 die "parse $gl_conf_compiled failed: " . ($! or $@) unless do $gl_conf_compiled;
23
24 $export_auth_hook = sub {
25 #    open FILE, ">>/tmp/gitweb.auth" or die $!;
26
27     my $reponame = "$subdir/" . shift;
28     # gitweb passes us the full repo path; so we strip the beginning...
29     $reponame =~ s/\Q$projectroot\E\/?//;
30     # ...and the end, to get the repo name as it is specified in gitolite conf
31     $reponame =~ s/\.git$//;
32
33 #    use Data::Dumper;
34 #    print FILE Dumper($username, $reponame, $repos);
35 #    close FILE;
36
37     return exists $repos{$reponame}{R}{$username}
38         || exists $repos{$reponame}{R}{'@all'};
39 };