]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/vcs: use git log to avoid unnecessary objects
authorhuweiwen <huweiwen.hww@alibaba-inc.com>
Thu, 22 Feb 2024 03:10:48 +0000 (03:10 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 4 Mar 2024 17:30:18 +0000 (17:30 +0000)
commitb159c99eb7eb292b62ec120d83bd25454cfa1fae
treea1462d6d622451c9faeeb931be9c000dbf022cd5
parent8a57cc8e3749f05134c82d7750b4ed1831f4d846
cmd/go/internal/vcs: use git log to avoid unnecessary objects

"git show" by default shows the diff from the previous commit. "-s"
suppress all output from the diff machinery. But it will still try to
fetch the relevant objects, which may be unavailable if the repository
is a partial clone.

Use "git log" instead, which only needs the commit object.

Fixes #65339

Change-Id: I766a680321cd22d5fdbd08d24cb777ef964bdb7c
GitHub-Last-Rev: 87a8ba435251f2a72aa18f2820ccb8ea5b379d69
GitHub-Pull-Request: golang/go#65341
Reviewed-on: https://go-review.googlesource.com/c/go/+/559075
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/cmd/go/internal/vcs/vcs.go
src/cmd/go/testdata/script/build_git_missing_tree.txt [new file with mode: 0644]
src/cmd/go/testdata/script/version_buildvcs_git.txt