aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/gofmt.go
diff options
context:
space:
mode:
authorAnthony Martin <ality@pbrane.org>2014-12-17 22:50:43 -0800
committerAnthony Martin <ality@pbrane.org>2014-12-30 14:33:19 +0000
commit081a9ac958014a95f591f8b42f0ab4ce0da6890c (patch)
treed4edc0d66cfddcb8730aa8873a3865532b5913e4 /git-codereview/gofmt.go
parent3076cb9dca59dbd37c3a58d9e428bfb2fe9d45bd (diff)
downloadgo-x-review-081a9ac958014a95f591f8b42f0ab4ce0da6890c.tar.xz
git-codereview: guard against ambiguous revision parameters
Change-Id: I3afcf06e1eab28bfdb2c6ace7aaf774070084900 Reviewed-on: https://go-review.googlesource.com/1783 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'git-codereview/gofmt.go')
-rw-r--r--git-codereview/gofmt.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-codereview/gofmt.go b/git-codereview/gofmt.go
index 648b795..529364b 100644
--- a/git-codereview/gofmt.go
+++ b/git-codereview/gofmt.go
@@ -119,7 +119,7 @@ func runGofmt(flags int) (files []string, stderrText string) {
}
// Find files modified in the index compared to the branchpoint.
- indexFiles := addRoot(repo, filter(gofmtRequired, getLines("git", "diff", "--name-only", "--diff-filter=ACM", "--cached", b.Branchpoint())))
+ indexFiles := addRoot(repo, filter(gofmtRequired, getLines("git", "diff", "--name-only", "--diff-filter=ACM", "--cached", b.Branchpoint(), "--")))
localFiles := addRoot(repo, filter(gofmtRequired, getLines("git", "diff", "--name-only", "--diff-filter=ACM")))
localFilesMap := stringMap(localFiles)
isUnstaged := func(file string) bool {