[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Savannah-hackers-public] [savannah-help-public] [sr #108411] Enable
Re: [Savannah-hackers-public] [savannah-help-public] [sr #108411] Enable commit mails including diffs for GNU AUCTeX
Sun, 13 Oct 2013 18:18:43 -0600
Karl Berry wrote:
> The existing hook script was calling run-parts on a .d
> Just for the record: with subversion this works more easily, because
> (I believe) stdin is not used to pass info to the hooks.
Notice I admitted that I couldn't believe I said that CVS was easier
than GIT there too. :-)
Actually it is pretty easy with git too. I ended up doing it this way:
while read oldrev newrev refname; do
echo $oldrev $newrev $refname | /usr/local/bin/git-post-receive-hook
echo $oldrev $newrev $refname | hooks/post-receive-mail-local
That will easily expand to more hooks if needed. Not terrible. Just
a problem if you don't realize that it operates that way and try to
use "run-parts" as would be the obvious thing. :-)
> E.g., The administration project's svn repo also uses run-parts;
> vcs:/srv/svn/administration/hooks/post-commit just calls run-parts on
> post-commit.d/, passing $REPOS and $REV with --arg. In fact, any svn
> project that wants commit mail is set up this way, though normally there
> is only one script in post-commit.d.
That is the more simple way to do it. I think most people would like
it better that way. I don't know why git's post-receive uses stdin.
I think that is definitely less nice. But not the end of the world
> It was highly convenient for the ikiwiki stuff that this was done, since
> I could add the crazy new script to do the wiki updating
> simply as another script to be executed by run-parts. I was impressed.
I am very happy to see the wiki documentation back online again!