From: Matthijs Kooijman Date: Thu, 13 Aug 2009 09:50:59 +0000 (+0200) Subject: git: Add a post-update hook for new repositories. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=6ac9194a16209a6d214cb293f97b277dec74ad6d;p=matthijs%2Fservers%2Fdrsnuggles.git git: Add a post-update hook for new repositories. --- diff --git a/usr/local/bin/git-wrapper b/usr/local/bin/git-wrapper index 1920599..6896ec8 100755 --- a/usr/local/bin/git-wrapper +++ b/usr/local/bin/git-wrapper @@ -9,10 +9,12 @@ # --base-path-relaxed. BASE_PATH='/data/vcs/git' +POST_UPDATE_HOOK="$BASE_PATH/hooks/post-update" function init_repos() { mkdir "$1" &> /dev/null || return 1 (cd $1 && git --bare init &> /dev/null) || return 1 + cp -P "$POST_UPDATE_HOOK" "$1/hooks/" || return 1 } # We keep an array of arguments, so we can handle quoting an spaces in