# problem with Documentation/hooks.txt

4 messages from 2007-01-07 to 2007-01-07. Participants: Alan Chandler, Martin Waitz, Nicolas Vilz.
Thread: https://gitlist.dev/t/6267

## Alan Chandler, 2007-01-07 11:13

Subject: problem with Documentation/hooks.txt
Message-ID: <200701071113.51597.alan@chandlerfamily.org.uk>
URL: https://gitlist.dev/e/200701071113.51597.alan%40chandlerfamily.org.uk

```
I was just looking at the documentation of the post-commit hook in order 
to fix a problem on one of my repositories and I came across this:-

"The default 'post-commit' hook, when enabled, demonstrates how to
send out a commit notification e-mail."

So I went looking in the templates/hooks--post-commit file and it has 
nothing (literally :-) ).

and as far as I can see looking over git's history it has always been 
like that.

I don't have an example to submit a patch - but I am sure lots of people 
have done something like that and could provide one.


-- 
Alan Chandler
http://www.chandlerfamily.org.uk

```

## Martin Waitz, 2007-01-07 12:34

Subject: Re: problem with Documentation/hooks.txt
Message-ID: <20070107123408.GD6115@admingilde.org>
URL: https://gitlist.dev/e/20070107123408.GD6115%40admingilde.org
In-Reply-To: <200701071113.51597.alan@chandlerfamily.org.uk>

```
hoi :)

On Sun, Jan 07, 2007 at 11:13:51AM +0000, Alan Chandler wrote:
> I was just looking at the documentation of the post-commit hook in order 
> to fix a problem on one of my repositories and I came across this:-
> 
> "The default 'post-commit' hook, when enabled, demonstrates how to
> send out a commit notification e-mail."

Have a look at the 'update' hook instead.
Where have you found this hint? We should change the documentation here.

-- 
Martin Waitz

```

## Alan Chandler, 2007-01-07 14:41

Subject: Re: problem with Documentation/hooks.txt
Message-ID: <200701071441.26001.alan@chandlerfamily.org.uk>
URL: https://gitlist.dev/e/200701071441.26001.alan%40chandlerfamily.org.uk
In-Reply-To: <20070107123408.GD6115@admingilde.org>

```
On Sunday 07 January 2007 12:34, Martin Waitz wrote:
> hoi :)
>
> On Sun, Jan 07, 2007 at 11:13:51AM +0000, Alan Chandler wrote:
> > I was just looking at the documentation of the post-commit hook in
> > order to fix a problem on one of my repositories and I came across
> > this:-
> >
> > "The default 'post-commit' hook, when enabled, demonstrates how to
> > send out a commit notification e-mail."
>
> Have a look at the 'update' hook instead.
> Where have you found this hint? We should change the documentation
> here.
Documentation/hooks.txt (under the post-commit hook section)


-- 
Alan Chandler
http://www.chandlerfamily.org.uk

```

## Nicolas Vilz, 2007-01-07 15:28

Subject: Re: problem with Documentation/hooks.txt
Message-ID: <20070107152852.GB10777@hermes.lan.home.vilz.de>
URL: https://gitlist.dev/e/20070107152852.GB10777%40hermes.lan.home.vilz.de
In-Reply-To: <20070107123408.GD6115@admingilde.org>

```
On Sun, Jan 07, 2007 at 01:34:08PM +0100, Martin Waitz wrote:
> hoi :)
> 
> On Sun, Jan 07, 2007 at 11:13:51AM +0000, Alan Chandler wrote:
> > I was just looking at the documentation of the post-commit hook in order 
> > to fix a problem on one of my repositories and I came across this:-
> > 
> > "The default 'post-commit' hook, when enabled, demonstrates how to
> > send out a commit notification e-mail."
> 
> Have a look at the 'update' hook instead.
> Where have you found this hint? We should change the documentation here.

May I repeat my ignored request to check the update-hook-example in
Documentation/howto/ for working correctly? It doesn't. 

I am no bash guru, but as far as i understand the code, the size of an
argument is checked with matchlen. That is imho bad for regexp. 

I built the scenario described there and i couldn't commit to the tmp/*
branches. I also couldn't commit to the bw/ topics and i couldn't tag
anything as the specific role proposed in this example.

as long as the length of the refs-string from the commit matches the one
in allowed-users, all is ok. But if it doesn't, which is imho obviously
the case if you use regexp in the allowed-users file, it doesn't work.

Unfortunatelly i can't fix that myself, but it would be good to correct
that example, if it really doesn't work... or at least please tell me,
what i am doing wrong :)

Nicolas Vilz

```
