Commit 90fea9d0 authored by Derek Shockey's avatar Derek Shockey Committed by Brad Fitzpatrick

misc/git: Fix non-literal period in pre-commit grep

Looks like this was intended to match a literal period to restrict
this to `.go` files, but in POSIX grep, the unescaped period matches
any character.

Change-Id: I20e00323baa9e9631792eff5035966297665bbee
Reviewed-on: https://go-review.googlesource.com/19880Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent c2d3e112
......@@ -10,7 +10,7 @@
#
# This script does not handle file names that contain spaces.
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$')
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.go$')
[ -z "$gofiles" ] && exit 0
unformatted=$(gofmt -l $gofiles)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment