From: mackyle at gmail.com (Kyle J. McKay)
Subject: owner links? (was: author/committer/tagger links -- kernel.org?)
Date: Thu, 16 Jan 2014 05:46:06 -0800 [thread overview]
Message-ID: <E679B337-20D9-4AB8-94D3-B498528E80AD@gmail.com> (raw)
In-Reply-To: <CAHmME9rY8hyffMoo2qYBB+-FiF599kAQ714O3m3iEmGTq7LR5g@mail.gmail.com>
On Jan 16, 2014, at 03:18, Jason A. Donenfeld wrote:
> On Thu, Jan 16, 2014 at 4:28 AM, Kyle J. McKay <mackyle at gmail.com>
> wrote:
>> Looking at the new docs for this [4] I don't see an option to
>> filter owners.
>> I see that the owner is passed in as "CGIT_REPO_OWNER", but I don't
>> see an
>> opportunity to produce the owner markup. Is it there and I'm just
>> not
>> seeing it?
>
> This is certainly interesting, though slightly different, as the
> owners aren't attached to email authors, like in the commits. Still
> though, something worth exploring. There are a number of options for
> this. I could add a filter wrapper around the owner column values. Or,
> I could implement the search capability directly in cgit. Or other
> things.
Here's the relevant change to gitweb on repo that supports this:
# owner link hook given owner name (full and NOT obfuscated)
# should return full URL-escaped link to attach to owner, for
example:
# sub { return "/showowner.cgi?owner=".CGI::Util::escape($_[0]); }
our $owner_link_hook = undef;
And we use this hook:
$owner_link_hook =
sub { url_path($Girocco::Config::webadmurl).
"/projlist.cgi?name=".md5_hex($_[0]); };
> First, though -- is repo.or.cz considering moving to cgit from its
> modified gitweb? Is this a serious investigation into cgit as a
> replacement?
Replacement's a strong word at this point. I've been looking into it
ever since I found this in the Apache config:
RewriteRule ^/c/(.*)$ /cgit.cgi?url=$1 [L,QSA]
So a cgit version of the cgit mirror would be http://repo.or.cz/c/cgit.git
(don't bother, 404 at this point).
I do slip in the occasional preparatory work [1] to make cgit support
easier when I become aware of such things. :)
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. :)
>> The repo.or.cz pages also try to make the email addresses more
>> difficult to
>> scrape by generating peculiar markup (the HTML::Email::Obfuscate
>> package) so
>> conceivably this could be handled in the owner filter as well.
>
> We have the noplainemail config flag already. Perhaps this could be
> phased out, preferring the email-filter and commit-filter instead.
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).
Kyle
[1] http://repo.or.cz/w/girocco.git/commit/abe9554c1bf1699ac0aaea08639310f404458d14
[2] http://repo.or.cz/w/girocco.git/blob/HEAD:/README
[3] http://repo.or.cz/w?a=project_list
next prev parent reply other threads:[~2014-01-16 13:46 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 [this message]
2014-01-16 22:02 ` Jason
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=E679B337-20D9-4AB8-94D3-B498528E80AD@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).