Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

refs #4472. Corrected problem with detecting executable file.

If you tried to commit a file with the executable flag set that
wasn't one of the normal extensions it would look at the first
line to see if it could see the normal unix #!/blah.

But the "!" in the grep wasn't escaped - so it is now!
  • Loading branch information...
commit 33a8e0c97240785c163bb2139e35611410eb1aa3 1 parent 6513a2c
@stuartcampbell stuartcampbell authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  .githooks/pre-commit
View
2  .githooks/pre-commit
@@ -121,7 +121,7 @@ mode_looks_exe() {
*.exe) return 0 ;;
*.com) return 0 ;;
esac
- git cat-file blob "$2" | head -1 | grep "^#!/" > /dev/null
+ git cat-file blob "$2" | head -1 | grep "^#\!/" > /dev/null
}
mode_not_exe () {
echo "The file '$file' has looks executable but does not have an executable mode."
Please sign in to comment.
Something went wrong with that request. Please try again.