Skip to content
Snippets Groups Projects
Commit 33a8e0c9 authored by Campbell, Stuart's avatar Campbell, Stuart
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!
parent 6513a2c7
No related branches found
No related tags found
No related merge requests found
......@@ -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."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment