#!/bin/shand since "exec" replace the current script with the other one, only one command can be execute in a hook. Even more, the common hook takes input from the standard input, so the first command takes it, and the second?
exec "another script"
The real situation was reportbug post-receive hook, that looked like:
#!/bin/shbut I wanted to add seanius' tagpending hook to it. The solution I found was:
#!/bin/shthat saves the stdin to a file, passed again to both the scripts.
# to save stdin on a file to pass to both scripts
cat > post-receive_tmpfile
/usr/local/bin/git-commit-notice < post-receive_tmpfile
/git/reportbug/reportbug.git/hooks/git-post-receive-url-notifications.py < post-receive_tmpfile
Of course, I'd be happy to hear more elegant solutions :)