From 96f988c0a2dd39a5747ec4a7bad05e7e8ee0d384 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Sat, 14 Jul 2018 23:42:59 +0200 Subject: [PATCH] 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 --- src/cmd/go/internal/modfetch/codehost/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/internal/modfetch/codehost/git.go b/src/cmd/go/internal/modfetch/codehost/git.go index afa046752f30fb..ef23e53775b48a 100644 --- a/src/cmd/go/internal/modfetch/codehost/git.go +++ b/src/cmd/go/internal/modfetch/codehost/git.go @@ -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) }