From 82103c29ca0f94f6df43e6b81fd57fa170aa985f Mon Sep 17 00:00:00 2001 From: Cache do Fluxo Date: Sun, 31 Jan 2016 22:06:40 -0200 Subject: Support post-receive hook only --- bin/post-receive | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'bin/post-receive') diff --git a/bin/post-receive b/bin/post-receive index 996189d..be32fee 100755 --- a/bin/post-receive +++ b/bin/post-receive @@ -1,7 +1,20 @@ #!/bin/sh +# +# Post-receive git hook +# cd .. unset GIT_DIR -git checkout -f +if [ -d ".git/annex" ]; then + git annex sync +else + git config receive.denyCurrentBranch ignore + git reset HEAD + git checkout -f +fi + git submodule update --init --recursive + +cd - +exec git update-server-info -- cgit v1.2.3