if $type
or return;
while (my $line = <$fd>) {
chomp $line;
- if ($line =~ m/^([0-9a-fA-F]{40})\trefs\/($type\/?[^\^]+)/) {
+ if ($line =~ m!^([0-9a-fA-F]{40})\srefs/($type/?[^^]+)!) {
if (defined $refs{$1}) {
push @{$refs{$1}}, $2;
} else {
@@ -1287,8 +1294,9 @@ sub parse_commit {
$co{'author'} = $1;
$co{'author_epoch'} = $2;
$co{'author_tz'} = $3;
- if ($co{'author'} =~ m/^([^<]+) ) {
- $co{'author_name'} = $1;
+ if ($co{'author'} =~ m/^([^<]+) <([^>]*)>/) {
+ $co{'author_name'} = $1;
+ $co{'author_email'} = $2;
} else {
$co{'author_name'} = $co{'author'};
}
@@ -1297,7 +1305,12 @@ sub parse_commit {
$co{'committer_epoch'} = $2;
$co{'committer_tz'} = $3;
$co{'committer_name'} = $co{'committer'};
- $co{'committer_name'} =~ s/ <.*//;
+ if ($co{'committer'} =~ m/^([^<]+) <([^>]*)>/) {
+ $co{'committer_name'} = $1;
+ $co{'committer_email'} = $2;
+ } else {
+ $co{'committer_name'} = $co{'committer'};
+ }
}
}
if (!defined $co{'tree'}) {
@@ -2428,6 +2441,7 @@ sub git_project_list_body {
($pr->{'age'}, $pr->{'age_string'}) = @aa;
if (!defined $pr->{'descr'}) {
my $descr = git_get_project_description($pr->{'path'}) || "";
+ $pr->{'descr_long'} = to_utf8($descr);
$pr->{'descr'} = chop_str($descr, 25, 5);
}
if (!defined $pr->{'owner'}) {
@@ -2463,7 +2477,7 @@ sub git_project_list_body {
} else {
print "" .
$cgi->a({-href => href(project=>undef, order=>'project'),
- -class => "header"}, "Project") .
+ -class => "header"}, "Project") .
" | \n";
}
if ($order eq "descr") {
@@ -2472,7 +2486,7 @@ sub git_project_list_body {
} else {
print "" .
$cgi->a({-href => href(project=>undef, order=>'descr'),
- -class => "header"}, "Description") .
+ -class => "header"}, "Description") .
" | \n";
}
if ($order eq "owner") {
@@ -2481,7 +2495,7 @@ sub git_project_list_body {
} else {
print "" .
$cgi->a({-href => href(project=>undef, order=>'owner'),
- -class => "header"}, "Owner") .
+ -class => "header"}, "Owner") .
" | \n";
}
if ($order eq "age") {
@@ -2490,7 +2504,7 @@ sub git_project_list_body {
} else {
print "" .
$cgi->a({-href => href(project=>undef, order=>'age'),
- -class => "header"}, "Last Change") .
+ -class => "header"}, "Last Change") .
" | \n";
}
print " | \n" .
@@ -2515,7 +2529,9 @@ sub git_project_list_body {
}
print "" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
-class => "list"}, esc_html($pr->{'path'})) . " | \n" .
- "" . esc_html($pr->{'descr'}) . " | \n" .
+ "" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
+ -class => "list", -title => $pr->{'descr_long'}},
+ esc_html($pr->{'descr'})) . " | \n" .
"" . chop_str($pr->{'owner'}, 15) . " | \n";
print "{'age'}) . "\">" .
$pr->{'age_string'} . " | \n" .
@@ -4188,7 +4204,7 @@ sub git_feed {
}
if (defined($revlist[0])) {
%latest_commit = parse_commit($revlist[0]);
- %latest_date = parse_date($latest_commit{'committer_epoch'});
+ %latest_date = parse_date($latest_commit{'author_epoch'});
print $cgi->header(
-type => $content_type,
-charset => 'utf-8',
@@ -4281,10 +4297,10 @@ XML
my $commit = $revlist[$i];
my %co = parse_commit($commit);
# we read 150, we always show 30 and the ones more recent than 48 hours
- if (($i >= 20) && ((time - $co{'committer_epoch'}) > 48*60*60)) {
+ if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {
last;
}
- my %cd = parse_date($co{'committer_epoch'});
+ my %cd = parse_date($co{'author_epoch'});
# get list of changed files
open $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts,
@@ -4310,9 +4326,19 @@ XML
print "\n" .
"" . esc_html($co{'title'}) . "\n" .
"$cd{'iso-8601'}\n" .
- "" . esc_html($co{'author_name'}) . "\n" .
+ "\n" .
+ " " . esc_html($co{'author_name'}) . "\n";
+ if ($co{'author_email'}) {
+ print " " . esc_html($co{'author_email'}) . "\n";
+ }
+ print "\n" .
# use committer for contributor
- "" . esc_html($co{'committer_name'}) . "\n" .
+ "\n" .
+ " " . esc_html($co{'committer_name'}) . "\n";
+ if ($co{'committer_email'}) {
+ print " " . esc_html($co{'committer_email'}) . "\n";
+ }
+ print "\n" .
"$cd{'iso-8601'}\n" .
"\n" .
"$co_url\n" .