implemented the pre-commit hook
[jelmer/etckeeper.git] / pre-commit.d / 10warn-hardlinks
1 #!/bin/sh
2 set -e
3 hardlinks=$(find -type f -not -links 1 | grep -v /.git/)
4 if [ -n "$hardlinks" ]; then
5         echo "warning: hardlinked files could cause problems with git:" >&2
6         echo "$hardlinks" >&2
7 fi