From: Giuseppe Bilotta Date: Thu, 11 Nov 2010 12:26:15 GMT Subject: [PATCHv7 08/11] gitweb: refactor repository URL printing Message-ID: <1289478378-15604-9-git-send-email-giuseppe.bilotta@gmail.com> In-Reply-To: <1289478378-15604-1-git-send-email-giuseppe.bilotta@gmail.com> Factor out the code to display the repository URL(s) from summary view into a format_rep_url() routine. Signed-off-by: Giuseppe Bilotta --- gitweb/gitweb.perl | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index bf38757..6e7a663 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3797,6 +3797,11 @@ sub git_print_header_div { "\n\n"; } +sub format_repo_url { + my ($name, $url) = @_; + return "$name$url\n"; +} + sub print_local_time { print format_local_time(@_); } @@ -5180,7 +5185,7 @@ sub git_summary { @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"; + print format_repo_url($url_tag, $git_url); $url_tag = ""; } -- 1.7.3.68.g6ec8