Skip to content

Commit cc5ef6e

Browse files
committed
vcs: support older versions of git
Fixes golang#51467. This uses the same flag already used in `src/cmd/go/internal/modfetch/codehost/git.go`, and avoids using a new flag that breaks Ubuntu 16 and Centos 7's latest git.
1 parent 4f80943 commit cc5ef6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/go/internal/vcs/vcs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func gitStatus(vcsGit *Cmd, rootDir string) (Status, error) {
312312
// uncommitted files and skip tagging revision / committime.
313313
var rev string
314314
var commitTime time.Time
315-
out, err = vcsGit.runOutputVerboseOnly(rootDir, "show -s --no-show-signature --format=%H:%ct")
315+
out, err = vcsGit.runOutputVerboseOnly(rootDir, "-c log.showsignature=false show -s --no-show-signature --format=%H:%ct")
316316
if err != nil && !uncommitted {
317317
return Status{}, err
318318
} else if err == nil {

0 commit comments

Comments
 (0)