Some cgit configs use trailing slashes in pathnames
which we preserve internally.
Before this change, trailing slashes in cgit config files
was causing ViewVCS (SolverGit) output to show up as "???"
for coderepos without cgitUrl configured.
my ($self) = @_;
my $ret = '???';
# don't show full FS path, basename should be OK:
- if ($self->{git_dir} =~ m!/([^/]+)(?:/\.git)?\z!) {
+ if ($self->{git_dir} =~ m!/([^/]+)(?:/*\.git/*)?\z!) {
$ret = "$1.git";
}
wantarray ? ($ret) : $ret;