From: Robert Richter Date: Mon, 04 Aug 2008 10:06:50 GMT Subject: [PATCH] Gitweb: Provide Git links in project list Message-ID: <1217844410-24079-1-git-send-email-robert.richter@amd.com> In-Reply-To: <1217796793.32240.36.camel@localhost.localdomain> Signed-off-by: Robert Richter --- gitweb/gitweb.perl | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 90cd99b..6d9b7aa 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3558,6 +3558,9 @@ sub fill_project_list_info { if (!defined $pr->{'owner'}) { $pr->{'owner'} = git_get_project_owner("$pr->{'path'}") || ""; } + if (!defined $pr->{'url_link'}) { + $pr->{'url_link'} = (git_get_project_url_list("$pr->{'path'}"))[0] || ""; + } if ($check_forks) { my $pname = $pr->{'path'}; if (($pname =~ s/\.git$//) && @@ -3661,6 +3664,7 @@ sub git_project_list_body { $cgi->a({-href => href(project=>$pr->{'path'}, action=>"shortlog")}, "shortlog") . " | " . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"log")}, "log") . " | " . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"tree")}, "tree") . + ($pr->{'url_link'} ? " | " . $cgi->a({-href => $pr->{'url_link'}}, "git") : '') . ($pr->{'forks'} ? " | " . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"forks")}, "forks") : '') . "\n" . "\n"; -- 1.5.5.4