Link mail message with git notes
Ondřej Bílka
neleai@seznam.cz
Mon Apr 8 14:03:00 GMT 2013
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
More information about the Libc-alpha
mailing list