]> git.ipfire.org Git - thirdparty/git.git/commit - git-cvsserver.perl
Have git-cvsserver call hooks/update before really altering the ref
authorAndy Parkins <andyparkins@gmail.com>
Tue, 13 Feb 2007 15:12:45 +0000 (15:12 +0000)
committerJunio C Hamano <junkio@cox.net>
Wed, 14 Feb 2007 10:15:42 +0000 (02:15 -0800)
commitb2741f63d43a17ce9dafd1f97614bd6dbba72887
tree20bd1ab19f6418c8f09aaab2ddfb953c7fac4aea
parent437b1b20df4b356c9342dac8d38849f24ef44f27
Have git-cvsserver call hooks/update before really altering the ref

git-cvsserver is analogous to git-receive-pack; a checking from a cvs
client to a central server is like a git-push from a working repository.
Therefore it's nice to use the same access control (and email sending)
that a receive-pack would perform.

This patch tests for an executable update hook; if it is it is run with
the ref being updated and the old and new hashes as normal.  If the
update hook returns an error code the update is aborted and the ref is
never updated.  The cvsserver returns "error 1" to the client to signal
there was an EPERM error.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsserver.perl