go /
review /
4579283bdd9fd37131e1ed6e0a4ae18f7fc79225 git-review: add gofmt command
- move gofmt invocation code from hook.go into gofmt.go
- use true branch point instead of HEAD^
- handle gofmt errors (syntax errors in Go files)
- apply gofmt command to both index and working tree, independently
- fix gofmt pre-commit hook to use index, not working tree
Change-Id: I7ed11c52531bb63b8af9ca5dd881bbfcdf5d5413
Reviewed-on: https://go-review.googlesource.com/1682
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
9 files changed