mirror of https://github.com/perkeep/perkeep.git
pre-commit hook: gofmt files from git index rather than working directory.
Fixes http://camlistore.org/issue/245 Change-Id: Ib5647ad7d0f05141243732923112bc9597cb1512
This commit is contained in:
parent
c16ada0121
commit
7b870f3d9e
|
@ -28,7 +28,7 @@ do
|
|||
javafile=`echo $c | grep -E '.*\.java$'`
|
||||
if [ -n "$gofile" ]
|
||||
then
|
||||
fmtdiff=`gofmt -d $c 2>&1`
|
||||
fmtdiff=`git show ":$c" | gofmt -d 2>&1`
|
||||
if [ -n "$fmtdiff" ]
|
||||
then
|
||||
echo "gofmt needed on "$c
|
||||
|
|
Loading…
Reference in New Issue