From: smithj4 at bnl.gov (Jason A. Smith)
Subject: [PATCH] Add support for git's mailmap.
Date: Thu, 25 Aug 2016 15:22:35 -0400 [thread overview]
Message-ID: <e7dabcac-5c39-cf94-ccbf-22afd161cbcc@bnl.gov> (raw)
In-Reply-To: <20160824223030.msh3y7woqiml5api@john.keeping.me.uk>
On 08/24/2016 06:30 PM, John Keeping wrote:
> On Wed, Aug 24, 2016 at 05:27:31PM -0400, Jason A. Smith wrote:
>> Are you proposing to remove the angle brackets around the email address
>> everywhere in cgit strings, to match git, which I think is done in the
>> parse_user function? Then use git's map_user directly and create a
>> cgit_print_ident function that inserts the angle brackets when printed?
>> Then also making local copies of the pointers so freeing the info
>> structure doesn't break the mailmap? I think this would be a much larger
>> change beyond just supporting the mailmap.
>
> Yes, pretty much exactly this. There's only a small number of sites
> that actually use author_email and committer_email, most of which are
> already printing something, so the fallout shouldn't be too bad.
>
> The only other cases are opening the email filter, which is why I
> suggested wrapping at least part of that process in a new function.
So how do you propose splitting the patches to accomplish this? One
patch to add mailmap support and another patch to modify how angle
brackets are handled in the email addresses? Which patch goes first and
who will fix the angle brackets? Are you volunteering? ;)
I haven't done much C programming in years and wasn't familiar with
neither the git nor cgit code, so it took me a little while to figure
out how to add mailmap support to cgit. I did it because we recently
added mailmap files to our local git repos to clean things up and I
noticed that cgit wasn't using them. I just looked at the filter code a
little and it looks a bit complicated to my novice eyes. I'm not sure
how to patch it to just modify only email addresses passed into it.
Another option might be to just just use another char string to wrap the
email address in angle brackets before opening the filter in the caller
and pass that instead?
~Jason
next prev parent reply other threads:[~2016-08-25 19:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 18:28 smithj4
2016-08-24 19:23 ` john
2016-08-24 21:27 ` smithj4
2016-08-24 21:38 ` smithj4
2016-08-24 22:30 ` john
2016-08-25 19:22 ` smithj4 [this message]
2016-08-25 20:12 ` john
2016-08-25 20:13 ` [PATCH 1/2] filter: introduce cgit_open_email_filter() wrapper john
2016-08-25 20:13 ` [PATCH 2/2] Remove angle brackets from {author,committer}_email john
2016-08-26 20:11 ` [PATCH] Add support for git's mailmap smithj4
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=e7dabcac-5c39-cf94-ccbf-22afd161cbcc@bnl.gov \
--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).