Odd message from git post-receive hook
John Ralls
jralls at ceridwen.us
Tue Nov 26 14:59:05 EST 2013
On Nov 26, 2013, at 9:08 AM, Geert Janssens <janssens-geert at telenet.be> wrote:
> Introduction: I'm currently the only one receiving mails from our gitolite's post-receive hook for
> commits pushed to the gnucash svn repository. But when we drop svn in favour of git,
> everybody will be receiving these messages. So any problem I come across in this internal test
> is important for our future list messaging.
>
> So I got this weird message sent today after I pushed a backporting commit to the 2.4 branch.
>
> Notice the mail subject: it talks about a patch for libgoffice, which I pushed to trunk earlier
> today. However that's not what I pushed to 2.4. You can see that in the actual commit message:
> I pushed
> [22070] Fix memory leak: Missing regfree() after regcomp().
>
> So how come the mail script whips up the wrong subject ?
>
> Geert
>
>
> ---------- Forwarded Message ----------
>
> Subject: gnucash 2.4: Report the proper minimum version for libgoffice when not found at
> configure time
> Date: Tuesday 26 November 2013, 11:57:04
> From: GIT SVN Migration User <git-svn at code.gnucash.org>
> To: info at kobaltwit.be
>
> Updated via https://github.com/Gnucash/gnucash/commit/907e9112 (commit)
> from https://github.com/Gnucash/gnucash/commit/7b7e57a6 (commit)
Because line 232 says:
subject="$projectdesc $short_refname: $(git log -n 1 --format=%s $newref)”
Which is the right answer only when git is checked out in the right branch.
We could make it
if [ “x$refname_type” = “xbranch” ]; then
subject="$projectdesc $short_refname: $(git log -b $refname -n 1 --format=%s $newref)”
else
subject="$projectdesc $short_refname: $(git log -n 1 --format=%s $newref)”
fi
Which would fix most instances.
Regards,
John Ralls
More information about the gnucash-devel
mailing list