diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/post-receive | 15 | ||||
-rwxr-xr-x | bin/post-update | 16 |
2 files changed, 14 insertions, 17 deletions
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 diff --git a/bin/post-update b/bin/post-update deleted file mode 100755 index 48a6a16..0000000 --- a/bin/post-update +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -cd .. -unset GIT_DIR - -if [ -d ".git/annex" ]; then - git annex sync -else - git reset HEAD - git checkout -f -fi - -git submodule update --init --recursive - -cd - -exec git update-server-info |