[PATCHv6 8/8] gitweb: add avatar in signoff lines
- From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- Date
- Jun 25, 2009, 10:43 UTC
- Message-ID
- <1245926587-25074-9-git-send-email-giuseppe.bilotta@gmail.com>
- In-Reply-To
- <1245926587-25074-8-git-send-email-giuseppe.bilotta@gmail.com>
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> ---
I can't say I'm really satisfied with the layout given by this patch. A significant improvement could be obtained by turning the signoff line block into a table with three/four columns (signoff, name, email/avatar). But we cannot guarantee that signoff lines come all together in a block, so this would be more complex to implement.
gitweb/gitweb.perl | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 7ca115f..d385f55 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3407,7 +3407,10 @@ sub git_print_log { $signoff = 1; $empty = 0; if (! $opts{'-remove_signoff'}) { - print "<span class=\"signoff\">" . esc_html($line) . "</span><br/>\n"; + my ($email) = $line =~ /<(\S+@\S+)>/; + print "<span class=\"signoff\">" . esc_html($line) . "</span>"; + print git_get_avatar($email, 'pad_before' => 1) if $email; + print "<br/>\n"; next; } else { # remove signoff lines
-- 1.6.3.rc1.192.gdbfcb