1
0
mirror of https://github.com/golang/go synced 2024-11-27 00:11:19 -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
This commit is contained in:
Frank Schroeder 2018-07-14 23:42:59 +02:00
parent c2eba53e7f
commit 96f988c0a2
No known key found for this signature in database
GPG Key ID: B0978B40C066A8CB

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)
}