From: Baokun Lee Date: Fri, 20 Jul 2018 17:37:21 +0000 (+0800) Subject: cmd/go/internal/modfetch: run git log with "-c log.showsignature=false" X-Git-Tag: go1.11beta3~92 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=90066bf06a9b10b3b222a289934b93723bb788d6;p=gostls13.git cmd/go/internal/modfetch: run git log with "-c log.showsignature=false" The old version git not support "--no-show-signature", git add this from v2.10.0. Fixes golang/go#26501. Change-Id: Ia6b54488651e8687b08a4d40e092822bf960c4fe Reviewed-on: https://go-review.googlesource.com/125315 Run-TryBot: Baokun Lee TryBot-Result: Gobot Gobot Reviewed-by: Bryan C. Mills --- diff --git a/src/cmd/go/internal/modfetch/codehost/git.go b/src/cmd/go/internal/modfetch/codehost/git.go index ca5fcfe783..0f159bd519 100644 --- a/src/cmd/go/internal/modfetch/codehost/git.go +++ b/src/cmd/go/internal/modfetch/codehost/git.go @@ -378,7 +378,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", "--no-show-signature", rev) + out, err := Run(r.dir, "git", "-c", "log.showsignature=false", "log", "-n1", "--format=format:%H %ct %D", rev) if err != nil { return nil, fmt.Errorf("unknown revision %s", rev) }