From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason at zx2c4.com (Jason A. Donenfeld) Date: Thu, 9 Jan 2014 19:59:27 +0100 Subject: RFE: author/committer/tagger links (enable cgit to show gravatar for author, committer and tagger) In-Reply-To: <20140109180707.GJ7608@serenity.lan> References: <1389192811-31573-1-git-send-email-mail@eworm.de> <20140108171507.GA4876@dcvr.yhbt.net> <52CEBE6F.2030907@kernel.org> <20140109180707.GJ7608@serenity.lan> Message-ID: On Thu, Jan 9, 2014 at 7:07 PM, John Keeping wrote: > It feels to me like it might be better to allow a filter to be applied > here. That way we don't put the Gravatar code in CGit itself but can > distribute an example script that does apply Gravatar links to email > addresses. > > I'm not sure what the cost of forking a process here will end up being > though; I guess for cases where the email is likely to be repeated we > could assume that the filter is pure and memoize the result. Gravatar icons are placed next to author names (in the log for example) as well as the full email address (in the commit). So we'd have to give such a filter the email address, as well as the original string to be printed. Such memorization would then need to apply to that pair. > > But that would give the greatest flexibility for both these use cases, > with a simple link value the Gravatar case needs some other forwarding > program on the server to do the hashing of the address (unless we > provide substitution values for a range of different things, but > currently everything just uses printf formats so that would be more > work unless we can reuse Git's log formatter somehow). I do like this idea quite a bit. But the cost of forking indeed seems a bit high -- some listings have many many authors all at once. I'll investigate a little bit. -- Jason A. Donenfeld Deep Space Explorer fr: +33 6 51 90 82 66 us: +1 513 476 1200 www.jasondonenfeld.com