]> gitweb.fluxo.info Git - git-hooks.git/commitdiff
In the event we can't rename hooks we should immediately fail.
authorBenjamin C Meyer <ben@meyerhome.net>
Thu, 24 Oct 2013 03:14:03 +0000 (23:14 -0400)
committerBenjamin C Meyer <ben@meyerhome.net>
Thu, 24 Oct 2013 03:16:15 +0000 (23:16 -0400)
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
git-hooks

index b42e46518bba8d8030dbabde0335f435e1ab67e4..ff154718c29ad9649048119e54c01f722531cfe0 100755 (executable)
--- a/git-hooks
+++ b/git-hooks
@@ -99,7 +99,9 @@ function install_hooks
             echo "hooks.old already exists, perhaps you already installed?"
             return 1
         fi
+        set -e
         mv hooks hooks.old
+        set +e
         mkdir hooks
         cd hooks
         for file in applypatch-msg commit-msg post-applypatch post-checkout post-commit post-merge post-receive pre-applypatch pre-auto-gc pre-commit prepare-commit-msg pre-rebase pre-receive update pre-push