From: Giuseppe Bilotta Date: Thu, 25 Jun 2009 10:43:07 GMT Subject: [PATCHv6 8/8] gitweb: add avatar in signoff lines 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 --- 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 "" . esc_html($line) . "
\n"; + my ($email) = $line =~ /<(\S+@\S+)>/; + print "" . esc_html($line) . ""; + print git_get_avatar($email, 'pad_before' => 1) if $email; + print "
\n"; next; } else { # remove signoff lines -- 1.6.3.rc1.192.gdbfcb