List for cgit developers and users
 help / color / mirror / Atom feed
From: Jason at zx2c4.com (Jason A. Donenfeld)
Subject: owner links? (was: author/committer/tagger links -- kernel.org?)
Date: Thu, 16 Jan 2014 23:02:49 +0100	[thread overview]
Message-ID: <CAHmME9qC=HNMNAgQRCvOx2bkwmS1A6xMr4RyqOx1z7_QJHcPTQ@mail.gmail.com> (raw)
In-Reply-To: <E679B337-20D9-4AB8-94D3-B498528E80AD@gmail.com>

On Thu, Jan 16, 2014 at 2:46 PM, Kyle J. McKay <mackyle at gmail.com> wrote:
> And we use this hook:
>
>   $owner_link_hook =
>     sub { url_path($Girocco::Config::webadmurl).
>           "/projlist.cgi?name=".md5_hex($_[0]); };
>

Well, that wound up being totally trivial, and a logical thing to have
by default anyway:

http://git.zx2c4.com/cgit/commit/?id=a58e6863cfe4f1411fedd556a96d8f8b9bf75761
You can try it out on: http://git.zx2c4.com/



> Looking at top, gitweb is clearly a CPU pig on repo.or.cz (git clones can
> also be piggy but I expect that to drop significantly when the new pack
> bitmap support is deployed).  And besides, the cgit display just looks good.
> I'd like to add support for cgit to girocco [2] as an alternative to gitweb.
> When that's sufficiently mature I'd like to deploy it alongside gitweb on
> repo for a time and then we can talk about switching.  :)

That'd be very cool to see. What types of things do you see cgit
needing to facilitate this?

> As you can see from the hook text above the repo gitweb hook only offers the
> ability to attach a link, it doesn't actually let one generate the markup or
> change the displayed owner name.  That's all I really need.  On the project
> list page [3] there are thousands of these, so running a shell script for
> each one is a non-starter.  A simple regex is not good enough either because
> it needs to generate the md5 hash (probably ought to be md5_hex(lc($_[0]))
> too -- another TODO item).

I don't know how closely you read the list, but some exciting things
have been happening the last two weeks. I too didn't like the idea of
having to run a shell script everytime I wanted to add a gravatar to
an email address, but I didn't l like the idea of hard coding the
logic to do so into cgit itself. So I integrated Lua/LuaJIT. It's
super super fast, only needs to evaluate the script one time (and then
each email it filters reuses the same context), and most importantly,
doesn't need to fork ever. We're using this for the new authentication
framework too:

http://git.zx2c4.com/cgit/tree/cgitrc.5.txt#n578
http://git.zx2c4.com/cgit/tree/filters/email-gravatar.lua
http://git.zx2c4.com/cgit/tree/filters/simple-authentication.lua

So it seems most feasible to use this for email obfuscation. (As I
mentioned before, we already have the "noplainemail" config option,
but we should probably remove this in favor of using this new filter
API.)


  reply	other threads:[~2014-01-16 22:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16  1:22 author/committer/tagger links -- kernel.org? Jason
2014-01-16  1:24 ` Jason
2014-01-16  3:28 ` owner links? (was: author/committer/tagger links -- kernel.org?) mackyle
2014-01-16 11:18   ` Jason
2014-01-16 13:46     ` mackyle
2014-01-16 22:02       ` Jason [this message]
2014-01-17  6:58         ` mackyle
2014-01-17 13:58           ` Jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHmME9qC=HNMNAgQRCvOx2bkwmS1A6xMr4RyqOx1z7_QJHcPTQ@mail.gmail.com' \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).