[PATCH] Display e-mail when hovering over committer name in print_branch

Chris Down chris at chrisdown.name
Thu Feb 7 07:09:34 CET 2013


>From 063a8139b18eac7dba52beb0030b1cfb42712e9c Mon Sep 17 00:00:00 2001
From: Chris Down <chris at chrisdown.name>
Date: Thu, 7 Feb 2013 13:53:27 +0800
Subject: [PATCH] Display e-mail when hovering over committer name in
print_branch

---
 ui-refs.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ui-refs.c b/ui-refs.c
index caddfbc..242551f 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -78,7 +78,15 @@ static int print_branch(struct refinfo *ref)
    if (ref->object->type == OBJ_COMMIT) {
        cgit_commit_link(info->subject, NULL, NULL, name, NULL, NULL, 0);
        html("</td><td>");
-       html_txt(info->author);
+       if (!ctx.cfg.noplainemail) {
+           html("<span alt='");
+           html_txt(info->committer_email);
+           html("'>");
+           html_txt(info->author);
+           html("</span>");
+       } else {
+           html_txt(info->author);
+       }
        html("</td><td colspan='2'>");
        cgit_print_age(info->commit->date, -1, NULL);
    } else {
--
1.8.1.2




More information about the CGit mailing list