diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 37a6284fc4..7c92ac30ce 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -533,6 +533,16 @@ sub git_get_project_description {
return $descr;
}
+sub git_get_project_url_list {
+ my $path = shift;
+
+ open my $fd, "$projectroot/$path/cloneurl" or return undef;
+ my @git_project_url_list = map { chomp; $_ } <$fd>;
+ close $fd;
+
+ return wantarray ? @git_project_url_list : \@git_project_url_list;
+}
+
sub git_get_projects_list {
my @list;
@@ -1697,10 +1707,14 @@ sub git_summary {
"
description | " . esc_html($descr) . " |
\n" .
"owner | $owner |
\n" .
"last change | $cd{'rfc2822'} |
\n";
+ # use per project git URL list in $projectroot/$project/cloneurl
+ # or make project git URL from git base URL and project name
my $url_tag = "URL";
- foreach my $git_base_url (@git_base_url_list) {
- next unless $git_base_url;
- print "$url_tag | $git_base_url/$project |
\n";
+ my @url_list = git_get_project_url_list($project);
+ @url_list = map { "$_/$project" } @git_base_url_list unless @url_list;
+ foreach my $git_url (@url_list) {
+ next unless $git_url;
+ print "$url_tag | $git_url |
\n";
$url_tag = "";
}
print "\n";