summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-06-29 22:00:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-30 18:06:34 (GMT)
commitba9247339dfbd2c2671603e012d011b4b474fa4b (patch)
tree1a3b139b49126ae8feb74620d606bef7c00b010c /gitweb/gitweb.perl
parentf88bafadd9b2562a0cd2500c5a9669d3741243b5 (diff)
downloadgit-ba9247339dfbd2c2671603e012d011b4b474fa4b.zip
git-ba9247339dfbd2c2671603e012d011b4b474fa4b.tar.gz
git-ba9247339dfbd2c2671603e012d011b4b474fa4b.tar.bz2
gitweb: use git_print_authorship_rows in 'tag' view too
parse_tag must be adapted to use the hash keys expected by git_print_authorship_rows. This is not a problem since git_tag is the only user of this sub. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl16
1 files changed, 9 insertions, 7 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 9a8d775..a393ac6 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2409,8 +2409,14 @@ sub parse_tag {
$tag{'name'} = $1;
} elsif ($line =~ m/^tagger (.*) ([0-9]+) (.*)$/) {
$tag{'author'} = $1;
- $tag{'epoch'} = $2;
- $tag{'tz'} = $3;
+ $tag{'author_epoch'} = $2;
+ $tag{'author_tz'} = $3;
+ if ($tag{'author'} =~ m/^([^<]+) <([^>]*)>/) {
+ $tag{'author_name'} = $1;
+ $tag{'author_email'} = $2;
+ } else {
+ $tag{'author_name'} = $tag{'author'};
+ }
} elsif ($line =~ m/--BEGIN/) {
push @comment, $line;
last;
@@ -4620,11 +4626,7 @@ sub git_tag {
$tag{'type'}) . "</td>\n" .
"</tr>\n";
if (defined($tag{'author'})) {
- my %ad = parse_date($tag{'epoch'}, $tag{'tz'});
- print "<tr><td>author</td><td>" . esc_html($tag{'author'}) . "</td></tr>\n";
- print "<tr><td></td><td>" . $ad{'rfc2822'} .
- sprintf(" (%02d:%02d %s)", $ad{'hour_local'}, $ad{'minute_local'}, $ad{'tz_local'}) .
- "</td></tr>\n";
+ git_print_authorship_rows(\%tag, 'author');
}
print "</table>\n\n" .
"</div>\n";