Today I wanted to allow all the users of the system group "mig" to write on my git bare repository. So I made a

chmod -R 770 repo.git

Because my colleagues will need to enter to many directories in there, and you won't get too far without +x permission on them. After issuing that command, git push didn't work anymore.

[16:35:27:gamma:src] git push
jerojasro@devnull.li's password:
Counting objects: 22, done.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (16/16), 1.99 KiB, done.
Total 16 (delta 11), reused 0 (delta 0)
*** Project description file hasn't been set
error: hooks/update exited with error code 1
error: hook declined to update refs/heads/master
*** Project description file hasn't been set
error: hooks/update exited with error code 1
error: hook declined to update refs/heads/sp-ocr
To devnull.li:/srv/d_sulaco/mig/git/louka.git
! [remote rejected] master -> master (hook declined)
! [remote rejected] sp-ocr -> sp-ocr (hook declined)
error: failed to push some refs to 'devnull.li:/srv/d_sulaco/mig/git/louka.git'

Project description file hasn't been set?? What the heck is happening? Only after a while (a while) I realized that, when I issued the chmod, I also enabled all the hooks on the bare repository (every git repo has disabled-by-default example hooks). I fixed the permissions (removed the +x bit on all the regular files) and everything worked just fine.