This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Link mail message with git notes
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 8 Apr 2013 12:53:43 +0200
- Subject: Re: Link mail message with git notes
- References: <20130224085129 dot GA5898 at domone dot kolej dot mff dot cuni dot cz> <201304021332 dot 01354 dot vapier at gentoo dot org> <20130402191315 dot GA9704 at domone dot kolej dot mff dot cuni dot cz> <201304021613 dot 42499 dot vapier at gentoo dot org>
On Tue, Apr 02, 2013 at 04:13:41PM -0400, Mike Frysinger wrote:
> On Tuesday 02 April 2013 15:13:15 OndÅej BÃlka wrote:
> > On Tue, Apr 02, 2013 at 01:31:59PM -0400, Mike Frysinger wrote:
> > > my only recourse is to take that commit message and search the mailing
> > > lists and *hope* that i find it on one of the public ones related to the
> > > project. this works a good amount of the time (i'd say ~85%), but it's
> > > very time consuming.
> >
> > What about having something like
> >
> > $ git log
> > ...
> > Notes:
> > Thread: http://sourceware.org/ml/libc-alpha/2013-04/msg00037.html
> >
> > Linking can be done retrospectively with script that automates
> > searching in archives.
> >
> > Then adding note would be done in post-commit hook.
> >
> > Probably someone already has script that does something similar. I would
> > be grateful if I did not have to reinvent wheel.
>
> that's a great idea. i'll try & keep it in mind next time i have to go
> digging through the archives.
>
I could also extract bugzilla number from commit message. It would
automaticaly add BZ # to NEWS.
I could also add BZ link could be added to notes.
I have post-hook almost ready. I need a script that reads, add $NO, sort, uniq,
format, update NEWS.
Rest of post-commit hook is following.
Comments?
# Did I miss some spelling?
BZ = `git log -n 1 | grep "BZ\|[bB]ug" | sed "s/[bB]ug\s+/BZ /" | sed "s/BZ\s+#/BZ /" | sed "s/.*BZ\s+\([0-9]+\).*/\1/"`
git notes append -m "BZ: http://sourceware.org/bugzilla/show_bug.cgi?id=$NO" # TODO omit duplicates.
# TODO insert to NEWS
git add NEWS
commit --ammend -C HEAD --no-verify