Skip to content

Commit 96f988c

Browse files
committed
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
1 parent c2eba53 commit 96f988c

File tree

1 file changed

+1
-1
lines changed
  • src/cmd/go/internal/modfetch/codehost

1 file changed

+1
-1
lines changed

src/cmd/go/internal/modfetch/codehost/git.go

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

0 commit comments

Comments
 (0)