Merge pull request #93 from lavalamp/improve_hooks

Improved commit hook
pull/6/head
brendandburns 2014-06-12 21:26:23 -07:00
commit da92ba3246
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
errors=0
for file in $(git diff --cached --name-only | grep "\.go"); do
diff="$(gofmt -d "${file}")"
diff="$(git show ":${file}" | gofmt -d)"
if [[ -n "$diff" ]]; then
echo "# *** ERROR: *** File ${file} has not been gofmt'd." >> $1
errors=1