Merge branch 'ab/fetch-tags-noclobber'
[gitweb.git] / t / t5406-remote-rejects.sh
index 59e80a5ea253607bf83ac4eed670744df950eb81..ff06f99649e4f09b88716ffef27e1aa12519c3a4 100755 (executable)
@@ -6,8 +6,9 @@ test_description='remote push rejects are reported by client'
 
 test_expect_success 'setup' '
        mkdir .git/hooks &&
-       (echo "#!/bin/sh" ; echo "exit 1") >.git/hooks/update &&
-       chmod +x .git/hooks/update &&
+       write_script .git/hooks/update <<-\EOF &&
+       exit 1
+       EOF
        echo 1 >file &&
        git add file &&
        git commit -m 1 &&