I'm trying to use git diff to ensure that my JavaScript has been beautified before committing.
js-beautify src.js | git -c core.fileMode=false diff --no-index -- src.js -
I've followed the instructions here for ignoring file mode but I still get this output.
diff --git a/src.js b/-
old mode 100755
new mode 100644
index 13158aa..0000000
I also tried git config core.fileMode false
to no avail. If I change permissions of the file and diff against HEAD, the command works as expected (diff is empty).
chmod 644 src.js
git -c core.fileMode=false diff -- src.js
Is it possible to ignore the permissions of files that aren't indexed? I'm using git version 1.9.1.