Merge branch 'maint'
[gitweb.git] / t / t5401-update-hooks.sh
index 2fff3001530bdf3e6acc283042d432a0698cea03..325714e5299a5b59157c3741e7fa0d98d70b9990 100755 (executable)
@@ -17,7 +17,8 @@ test_expect_success setup '
        commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
        git update-ref refs/heads/master $commit0 &&
        git update-ref refs/heads/tofail $commit1 &&
-       git-clone ./. victim &&
+       git clone ./. victim &&
+       GIT_DIR=victim/.git git config receive.denyCurrentBranch warn &&
        GIT_DIR=victim/.git git update-ref refs/heads/tofail $commit1 &&
        git update-ref refs/heads/master $commit1 &&
        git update-ref refs/heads/tofail $commit0
@@ -61,7 +62,8 @@ EOF
 chmod u+x victim/.git/hooks/post-update
 
 test_expect_success push '
-    ! git-send-pack --force ./victim/.git master tofail >send.out 2>send.err
+       test_must_fail git send-pack --force ./victim/.git \
+               master tofail >send.out 2>send.err
 '
 
 test_expect_success 'updated as expected' '