]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwCoderepo.pm
www_coderepo: fix snapshot link generation
[public-inbox.git] / lib / PublicInbox / WwwCoderepo.pm
index e3d45c564da47561e013ca1b445e7a9ac1a43d72..4d8713b41cdbdfd6e8134b8dc4b22df29888548c 100644 (file)
@@ -142,9 +142,9 @@ EOM
        my $n;
        if (@s) {
                $n = $ctx->{git}->local_nick // die "BUG: $ctx->{git_dir} nick";
-               $n =~ s/\.git\z/-/;
-               ($n) = ($n =~ m!([^/]+)\z!);
-               $n = ascii_html($n);
+               $n =~ s!\.git/*\z!!;
+               ($n) = ($n =~ m!([^/]+)/*\z!);
+               $n = ascii_html($n).'-';
        }
        for (@r) {
                my (undef, $oid, $ref, $s, $cd) = split(/\0/);