1
0
mirror of https://github.com/golang/go synced 2024-11-23 08:30:05 -07:00

cmd/go: run git log with --no-show-signature

Git timestamp parsing is broken when fetching modules if the
local git configuration has 'log.showsignature=true'.

Fixes #26388

Change-Id: I47f92381784072335a2a465de56092106c616108
GitHub-Last-Rev: 96f988c0a2
GitHub-Pull-Request: golang/go#26389
Reviewed-on: https://go-review.googlesource.com/123958
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Frank Schroeder 2018-07-14 21:58:07 +00:00 committed by Russ Cox
parent 5419e7a09d
commit b9a764ffdf

View File

@ -362,7 +362,7 @@ func (r *gitRepo) stat(rev string) (*RevInfo, error) {
// statLocal returns a RevInfo describing rev in the local git repository.
// It uses version as info.Version.
func (r *gitRepo) statLocal(version, rev string) (*RevInfo, error) {
out, err := Run(r.dir, "git", "log", "-n1", "--format=format:%H %ct %D", rev)
out, err := Run(r.dir, "git", "log", "-n1", "--format=format:%H %ct %D", "--no-show-signature", rev)
if err != nil {
return nil, fmt.Errorf("unknown revision %s", rev)
}