doc/3: gitweb integ; trailing slash on $projectroot

It's not clear whether $projectroot has or does not have a trailing
slash.  Current code assumes it does, but we need to cater for it not
having one also.  Otherwise the final reponame ends up with a leading
slash, once $projectroot has been stripped from the beginning of the
full repo path.
This commit is contained in:
Sitaram Chamarty 2010-01-21 08:40:26 +05:30 committed by Sitaram Chamarty
parent b0ce84d47f
commit c1de05a8a5

View file

@ -347,7 +347,7 @@ already done and we just use it!
$export_auth_hook = sub { $export_auth_hook = sub {
my $reponame = shift; my $reponame = shift;
# gitweb passes us the full repo path; so we strip the beginning... # gitweb passes us the full repo path; so we strip the beginning...
$reponame =~ s/\Q$projectroot//; $reponame =~ s/\Q$projectroot\E\/?//;
# ...and the end, to get the repo name as it is specified in gitolite conf # ...and the end, to get the repo name as it is specified in gitolite conf
$reponame =~ s/\.git$//; $reponame =~ s/\.git$//;