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:
parent
b0ce84d47f
commit
c1de05a8a5
|
@ -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$//;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue