diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2012-07-26 16:09:49 +0200 |
---|---|---|
committer | added by portage for gitolite-gentoo <git@vm-git.spline.inf.fu-berlin.de> | 2012-07-26 16:09:49 +0200 |
commit | 5e0d3562ae6762925ab05eb6881a4780d3243db0 (patch) | |
tree | eec4308de7c42f409c96f127a4634aaff957bc47 | |
parent | 0fd1a0306cd025fc16785dad8f2e208b9d60cb29 (diff) | |
download | hooks-5e0d3562ae6762925ab05eb6881a4780d3243db0.tar.gz hooks-5e0d3562ae6762925ab05eb6881a4780d3243db0.tar.bz2 hooks-5e0d3562ae6762925ab05eb6881a4780d3243db0.zip |
add post-receive hook for pushing the repo to the next server
-rwxr-xr-x | post-receive.push-forward | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/post-receive.push-forward b/post-receive.push-forward new file mode 100755 index 0000000..56800ed --- /dev/null +++ b/post-receive.push-forward @@ -0,0 +1,10 @@ +#! /bin/bash +while read old new ref ; do + BRANCH="${ref#refs/heads/}" + + if [ "${new}" = "0000000000000000000000000000000000000000" ]; then + git push --force vm-staticweb ":${BRANCH}" + else + git push --force vm-staticweb "${BRANCH}" + fi +done |