How to verify:
- Install nix
- Clone this gist and install overcommit twice in nix-shell:
git clone https://gist.github.com/ento/a77fb97f581bdea4ed27c845107308bf
# or git@gist.github.com:a77fb97f581bdea4ed27c845107308bf.git
cd a77fb97f581bdea4ed27c845107308bf
nix-shell
overcommit --install
overcommit --install # this fails
[ -w .git/hooks/overcommit-hook ] && echo "Master hook is writable" || echo "Master hooks is not writable"