Git hooks
Re: Git hooks
I made a few changes: http://github.com/cs278/phpbb3/commits/git-tools
Re: Git hooks
Thanks, however now both stdout and stderr are being output with `php -l`. Actually I believe only stdout is stored in $result and sterr output directly.
PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in - on line 3
PHP Syntax check failed:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE test.php line 3
Re: Git hooks
It doesn't output on stderr for me, how odd. :-/eviL3 wrote:Thanks, however now both stdout and stderr are being output with `php -l`. Actually I believe only stdout is stored in $result and sterr output directly.PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in - on line 3
PHP Syntax check failed:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE test.php line 3
Re: Git hooks
Mac OS 10.6.3, PHP 5.3.1, GNU bash 3.2.48, GNU grep 2.5.4.
If it worked properly before I'd suggest reverting.
If it worked properly before I'd suggest reverting.
Re: Git hooks
Another thing, are you sure you want all branch names to be added to commit messages? Instead of just (bug|feature) named branches.
Re: Git hooks
Well from what you suggest you get both outputs so if I just send stderr to /dev/null that should be fine.eviL3 wrote:Mac OS 10.6.3, PHP 5.3.1, GNU bash 3.2.48, GNU grep 2.5.4.
If it worked properly before I'd suggest reverting.
Yup Nils wants the branch prefixed before all commit messages.eviL3 wrote:Another thing, are you sure you want all branch names to be added to commit messages? Instead of just (bug|feature) named branches.
Re: Git hooks
I've added the stderr null redirect. If it works on your end I'll send Nils the pull request.
Re: Git hooks
Thumbs up.eviL3 wrote:I've added the stderr null redirect. If it works on your end I'll send Nils the pull request.
Re: Git hooks
One observation I have with the commit message hook is that if one starts the commit (git ci -a) and then quits without making any changes to the commit message, the commit would proceed due to commit message not being empty. Without the hook git would abort the commit.
I made some changes to remove bashisms from precommit hook so that it runs under freebsd's /bin/sh: http://github.com/p/phpbb3/compare/deve ... us...hooks
I made some changes to remove bashisms from precommit hook so that it runs under freebsd's /bin/sh: http://github.com/p/phpbb3/compare/deve ... us...hooks
Re: Git hooks
That is true, but I don't see an easy way around it. The current approach gives you full control over the commit message but also forces you to remove it if you want to abort the commit. Suggestions welcome.
Does freebsd not support bash? Or to put it differently, are there many platforms that do not support bash?
Could you perhaps rename your branch to git-tools, so we have some consistency? I'm just saying this because Chris (ToonArmy) also has a "hooks" branch which serves a completely different purpose.
Does freebsd not support bash? Or to put it differently, are there many platforms that do not support bash?
Could you perhaps rename your branch to git-tools, so we have some consistency? I'm just saying this because Chris (ToonArmy) also has a "hooks" branch which serves a completely different purpose.