[PATCHv6 8/8] gitweb: add avatar in signoff lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@xxxxxxxxx>
---

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]