- if [ -x "$git_dir/hooks/$1" ]; then
- if fgrep -q "$hook_call" "$git_dir/hooks/$1"; then
- # Another job well done!
- return
- fi
+ if [ -f "$git_dir/hooks/$1" ] &&
+ fgrep -q "$hook_call" "$git_dir/hooks/$1"; then
+ # Another job well done!
+ return