]> gitweb.fluxo.info Git - cache.git/commitdiff
Support post-receive hook only
authorCache do Fluxo <cache@fluxo.info>
Mon, 1 Feb 2016 00:06:40 +0000 (22:06 -0200)
committerCache do Fluxo <cache@fluxo.info>
Mon, 1 Feb 2016 00:06:40 +0000 (22:06 -0200)
Makefile
bin/post-receive
bin/post-update [deleted file]

index ef400adade992a7ff4aef341a20dfc6a3eca6e1a..721134df04d16317aa6a3cabccbb0a75e7ec382e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,12 +22,7 @@ web_deploy:
        git push www
        #@rsync -avz --delete www/ blog:/var/sites/blog/www/
 
-post_update:
-       git config receive.denyCurrentBranch ignore
-       cd .git/hooks && ln -sf ../../bin/post-update
-
 post_receive:
-       git config receive.denyCurrentBranch ignore
        cd .git/hooks && ln -sf ../../bin/post-receive
 
 whoami:
index 996189df186c799b213d47979a6945ddcc6dbd9f..be32fee0651d39cbb08d3e3cc0e7781ac6bfefc4 100755 (executable)
@@ -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 (executable)
index 48a6a16..0000000
+++ /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